How to Add Featured Images or Post Thumbnails in WordPress

[easy-social-share counters=0 style="button"]

Featured images well-known as post thumbnails are a favorite feature in WordPress themes. At this time almost all WordPress photography themes, restaurant themes, church themes, or other kinds of themes get built in help support for post thumbnails. In this post we can easily allow you to insert featured images and post thumbnails in WordPress.
You will be planning exactly why are we using featured image or post thumbnail interchangeably. Definitely, after this feature was 1st presented in WordPress 2.9, it has beencalled post thumbnails. At the same time, next model it has been renamed to featured image.

Featured Images in WordPress

Featured Images and Post Thumbnails is a theme feature. A lot of theme just like Genesis etc help featured images by default.
A simple way to find out possibly your themes helps featured images is actually certainly the post editor. Easily set up the latest post and then scroll down a little bit to check ifyou can find a meta box called featured images on the exactly right hand side of the display screen.


Adding Post Thumbnail or Featured Image in WordPress

To insert a featured image in a WordPress post, easily click “Set Featured Image” link inside the featured image meta box displayed in the screenshot above.
In this way you will open up the WordPress Media Uploader. You are using that to upload a picture from your personal computer and using a current image from your media library. When you choose the image, easily click Set Featured Image key.

The image can look in the Featured Image meta box, like that:


It is very important notice that the picture may appear just a little bit in a different way in your themes. The situation are dependent on the best way your theme handles featured images.
A few portals themes using small thumbnails at the side of post summaries on the most important page, or a bigger version on the single post look.
Based on settings definite by your theme web developer, your featured image will automatically appear with your posts. At the same time, if you would like modify the methodyour theme can handle featured images or post thumbnails then read more.
Notice: Anything below it will need coding information.

Featured Image and Post Thumbnails in WordPress

Although the featured image is well-known feature held up by a great number of themes, it is actually at all possible which you can use a theme it does not help featured images. In this case, you can also insert featured image help to your theme. In case you are enjoyable editing theme files or know your path around some CSS, you can do-it-yourself.
To insert featured image help in a WordPress theme, you will need to insert this collection of code in your theme’s functions.php file:

<?php add_theme_support( 'post-thumbnails' ); ?>

This code that will ensure featured image help for posts and pages. Now you can go into posts and pages, so you will find featured image choice enabled. However,whenever you set a featured image it will not automatically show in your WordPress themes. To show featured images in your themes, you are required to modify your templates and also insert this collection of code in which you need to show the featured image:

<?php the_post_thumbnail(); ?>

The data files you insert the above code in can vary based upon your theme. Make sure you insert the code inside your post loop.
The above code is the simple function you need to insert featured image help or show featured images in your themes. To set up image size for featured images you upload,you will need to insert this collection of code to your functions.php file folder.

<?php set_post_thumbnail_size( 50, 50); ?>

The guidelines for set_post_thumbnail_size are actually in this order: width, height.
You should also able to set additional image sizes to use with the_post_thumbnail( ) function. Just like:

// Image size for single posts

<?php add_image_size( 'single-post-thumbnail', 590, 180 ); ?>

For this an example we have now inserted the latest image size known as single-post-thumbnail with 590px with or 180px height. To make use of this image size in ourthemes, we have to still require to insert it in the appropriate themes file folder. Check out our guideline on attaching additional image sizes in WordPress to get more detailed information.

In case you have previously uploaded featured images, but they are still sometimes appearing in any other size, then you really require to regenerate thumbnails and alsoimage sizes for old posts.
Below is a good example of the featured image function with a particular image size.

<?php the_post_thumbnail( 'single-post-thumbnail' ); ?>

It is broken up model of the full functionality. You can easily further extend the functionality of featured images. As an example, you can easily set a default fallback image for post thumbnails, show featured images with captions, and even insert a number of post thumbnails and featured images.

Submit a comment

Pin It on Pinterest