• Resolved Claus Pescha

    (@taruk)


    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

    (@taruk)

    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.