How to access caption data
-
Hi,
I want to be able to manipulate the captions on atlasandboots.com. For example, the in-post image here: https://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.
Thank you,
Kia
- The topic ‘How to access caption data’ is closed to new replies.