WordPress.org

Support

Support » Themes and Templates » [Resolved] Caption for featured images

[Resolved] Caption for featured images

Viewing 1 replies (of 1 total)
  • John Parris
    Participant

    @mindctrl

    Hey Morgan,

    That’s not currently a feature of the theme. We wanted to keep it super clean and it didn’t fit into the design we wanted. You could add it to your site, probably in content.php, using a child theme so you don’t lose changes when you install future Editor updates.

    You’ll need something like this to grab the caption from the featured image.

    <?php
    $featured_image = wp_prepare_attachment_for_js( get_post_thumbnail_id( get_the_ID() ) );
    echo $featured_image['caption'];
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Caption for featured images’ is closed to new replies.