English English French French Spanish Spanish German German
Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

How to Show Featured Image in WordPress Single Post?

Untitled-1200-×-385-px-19
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Display featured image in WordPress post as full, large, medium, thumbnail size

Every available WordPress theme doesn’t give you the option to control if you want to show featured image in a post or in what size you want to display them.

The image is crucial for your blog post as it’s probably the first thing audience notice.

For ex, I am using the Hueman theme and that doesn’t display featured images in single post. Here is what I did and thought to share so you can be benefited.

  • Go to your theme directory
  • For ex: wp-content/themes/hueman
  • Take a backup of single.php
  • Edit single.php and search for <?php the_content(); ?>
  • Add following above the <?php the_content(); ?>
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail( 'full' );
}
?>
  • Save the file and refresh your wordpress to see them in action.

Above code will show featured image in the single post as original image size. This is how single.php will look like.

featured-image-wordpress-post

If you want to control the size, you can change the_post_thumbnail parameter.

To display default thumbnail size (default 150px x 150px max)

the_post_thumbnail();

To display in medium size (default 300px x 300px max)

the_post_thumbnail( 'medium' );

To display in large size (default 640px x 640px max)

the_post_thumbnail( 'large' );

To display in original uploaded size

the_post_thumbnail( 'full' );

This has helped me and I hope you too. Don’t forget to compress your images with these awesome free online image compressor tool. Let me know how it goes with your theme.

Thanks to our Sponsors
More great readings on WordPress
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder