WordPress.org

Ready to get started?Download WordPress

Forums

Editor
[resolved] Caption for featured images (2 posts)

  1. morganpotts
    Member
    Posted 2 months ago #

    Is there a way to display the captions on featured images?

  2. mindctrl
    Member
    Posted 2 months ago #

    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'];
    ?>

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.