Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 73026

How to access caption data

$
0
0

Replies: 0

Hi,

I want to be able to manipulate the captions on atlasandboots.com. For example, the in-post image here: http://www.atlasandboots.com/gift-of-bilingualism.

To simplify, say I want to add a string that says (Image: Atlas & Boots) after every existing caption on the site.

I thought I could go to image.php and then edit the bold line into the following piece of code, but it doesn’t work.

<?php if ( ! empty( $post->post_excerpt ) ) : ?>
<div class=”entry-caption”>
<?php the_excerpt(); ?>
<p>(Image: Atlas & Boots)</p>
</div>
<?php endif; ?>

I’ve tried <?php echo “Image: Atlas & Boots”; ?> as well but it doesn’t work. I can’t figure out where the captions are being added in the template. Any help would be much appreciated.


Viewing all articles
Browse latest Browse all 73026

Trending Articles