Support

Home Forums Event Espresso Premium Caption for featured image

Caption for featured image

Posted: June 2, 2017 at 7:18 am

Viewing 3 reply threads


slidebird

June 2, 2017 at 7:18 am

Hi there

we mostly use featured images from artists on our events so we have to place the copyright in the caption… but if i fill out the caption in the WordPress Mediathek the Event picture still shows no caption?!


Josh

  • Support Staff

June 2, 2017 at 7:33 am

Yes that’s correct and you can add captions to featured images with a plugin like this one:

https://wordpress.org/plugins/featured-image-caption/


slidebird

June 2, 2017 at 7:49 am

hmm i installed the plugin but it doesnt work on the single event page… still no caption altough i filled out every field in the mediathek


Josh

  • Support Staff

June 2, 2017 at 8:37 am

In that case your other option is you fix your WordPress theme by following these steps:

1) Open the theme’s single.php file
2) Look for code that resembles this:
<?php the_post_thumbnail('post-image'); ?>
3) Add the following after the post thumbnail code:

<?php if ( !empty(get_post(get_post_thumbnail_id())->post_excerpt) ) : ?>				
 <div class="media-caption-container">	
  <p class="media-caption">
   <?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?>
  </p>		
 </div>	
<?php endif; ?>

4) You can avoid losing your changes in the event of a theme update by putting your modified templates into a WordPress a child theme.

Viewing 3 reply threads

The support post ‘Caption for featured image’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso