How to Show Featured Image in WordPress Single Post?

Present featured picture in WordPress publish as full, giant, medium, thumbnail dimension

Each obtainable WordPress theme doesn’t provide the choice to decide on whether or not to show featured photographs in a publish or what format to show them in.

The picture is essential to your weblog publish as it’s in all probability the very first thing the viewers notices.

For instance, I am utilizing the Hueman theme and that does not present featured photographs in a single publish. This is what I did and thought I would share so you’ll be able to profit.

  • Go to your theme folder
  • For instance: wp-content/themes/hueman
  • Again up single.php
  • Edit single.php and seek for
  • Add the next above the
<?php
if ( has_post_thumbnail() ) { // test if the publish has a Publish Thumbnail assigned to it.
the_post_thumbnail( 'full' );
}
?>
  • Save the file and refresh your WordPress to see them in motion.

The code above exhibits the featured picture within the single publish as the unique picture dimension. That is what single.php will appear like.

featured-image-wordpress-post

If you wish to decide the dimensions, you’ll be able to change it the_post_thumbnail parameter.

Nasty show default thumbnail dimension (default 150px x 150px max)

the_post_thumbnail();

Nasty medium dimension show (default 300px x 300px max)

the_post_thumbnail( 'medium' );

Nasty show in giant format (default 640px x 640px max)

the_post_thumbnail( 'giant' );

Nasty show within the unique uploaded dimension

the_post_thumbnail( 'full' );

This helped me and I hope you do too. Do not forget to compress your photographs with this nice free on-line picture compression instrument. Let me know the way your theme goes.

Leave a Comment

porno izle altyazılı porno porno