Title: Display image caption
Last modified: May 14, 2020

---

# Display image caption

 *  Resolved [Claus Pescha](https://wordpress.org/support/users/taruk/)
 * (@taruk)
 * [6 years ago](https://wordpress.org/support/topic/display-image-caption/)
 * Hi Tom,
    how can I get WP-Show-Posts to display the image caption? I need it 
   to display the author of the image.
 * Thanks for your support.
 * Best regards
    Claus

Viewing 1 replies (of 1 total)

 *  Thread Starter [Claus Pescha](https://wordpress.org/support/users/taruk/)
 * (@taruk)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/display-image-caption/#post-13246236)
 * Solution using WPSP Hooks in GeneratePress Elements:
 * Availabel WPSP-Hooks:
    wpsp_before_wrapper wpsp_before_header wpsp_before_title
   wpsp_after_title wpsp_before_content wpsp_after_content wpsp_after_wrapper
 * Use one of these as a user defined hook.
 * Hook content:
    <?php if (get_post(get_post_thumbnail_id())->post_excerpt) { //
   search for if the image has caption added on it ?> <p class=”featured-image-caption”
   > <?php echo wp_kses_post(get_post(get_post_thumbnail_id())->post_excerpt); //
   displays the image caption ?> </p> <?php } ?>
 * Works. Good luck.

Viewing 1 replies (of 1 total)

The topic ‘Display image caption’ is closed to new replies.

 * ![](https://ps.w.org/wp-show-posts/assets/icon-256x256.png?rev=2846296)
 * [WP Show Posts](https://wordpress.org/plugins/wp-show-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-show-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-show-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-show-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-show-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-show-posts/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Claus Pescha](https://wordpress.org/support/users/taruk/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/display-image-caption/#post-13246236)
 * Status: resolved