• Hey everyone!

    I’m creating my site and I noticed that my post thumbnail does not show on post page. I’ve set the image already inside the post and checked the functions.php to make sure the function is there.

    I’m editing css in a child theme but I don’t have much code added. I’m using Hayden theme btw.

    Can someone please help me with this issue?

    Thank you in advance!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • This is a question for your theme author.

    If the hayden theme does not include the thumbnail as part of the theme, you will need to make a child theme version of the single.php template and include the_post_thumbnail() in it.

    Thread Starter rafaelzenato

    (@rafaelzenato)

    @katmacau

    Thank you for the reply.

    Actually, I believe it already includes the thumbnail as part of the theme. There is the following code in functions.php in the parent theme:

    add_theme_support(‘post-thumbnails’);

    Should I still create a single.php in child theme?

    Thank you!

    add_theme_support(‘post-thumbnails’); is just there to allow you to set a featured image for your posts in the admin. Your theme has to then include it somewhere in the layout for it to be used. For example, duplicate your single.php from the parent theme and then add in this code where you want the thumbnail to show:

    <?php
    if ( has_post_thumbnail() ) {
    the_post_thumbnail(‘medium’);
    }
    ?>

    You can set the size as thumbnail, medium, large or full if you need too.

    Thread Starter rafaelzenato

    (@rafaelzenato)

    @katmacau

    Thank you very much for the help! I had a person helping me and it’s solved now.

    Thanks,
    Rafael

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post Thumbnail not showing’ is closed to new replies.