Support » Theme: Twenty Nineteen » Add feature image to posts?

  • Resolved ironlion37


    Hi, I’d like to have twenty-nineteen display the featured image if one is added by the user. I’d like the image to be centered and sit directly above the text of the post. I only need the image on the post page itself, not anywhere else in the template.

    I’ve made a copy of template-parts/content/content-single.php and put it in the child theme folder. And I see this line in that file:

    <?php if ( ! twentynineteen_can_show_post_thumbnail() ) : ?>

    That’s about as far as I can get on my own.

    Thanks for any help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can just use the following function to display the featured image anywhere in the template


    You can wrap it in a div, span, etc….whatever works best for you. Although by default TwentyNineteen also shows the featured image in the header of the site as well. Are you wanting that to not display?

    Thank you Jarret! Solved 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.