• Hi all,

    My posts feature image that is used to display when viewing in a category. I want to also show it at the top of the post itself.

    I used this code in my single.php to achieve this:

    <?php if ( has_post_thumbnail() ):?>
    <div class=”featured-image-wrap”><?php the_post_thumbnail(); ?></div>
    <?php endif; ?>

    Now my issue is that when I put in the standard wordpress sizes they don’t work well across multiple screens. So I would like it so that the image is responsive.

    I am meant to put the size between () of <?php the_post_thumbnail(); ?> but I don’t know how to do this to make it responsive

    Could someone kindly help me.

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Want to show feature image at the top of post’ is closed to new replies.