How to Add a Featured Image to WordPress Post?

Posted on by in Wordpress

Adding a featured image to a wordpress site gives a very good visual presence.Wordpress now offers a simple way to upload an image to be used as featured image associated with a post. There is no need of cropping the images or specify a custom field the theme was going to use. In wordpress 3.0 this feature is set as “Featured Image” on the right-hand side of the add post page. In order to use this feature a compatible theme is required.

With some modifications to the functions. php file, all wordpres themes can be enabled for adding featured images. If there is no “Featured Image “box on the right side of the write page, one needs to enable it by adding the following code to the functions.php template file.

1. // Add support for Featured Images

2. if (function_exists(‘add_theme_support’)) {

3.    add_theme_support(‘post-thumbnails’);

4.    add_image_size(‘index-categories’, 150, 150, true);

5.    add_image_size(‘page-single’, 350, 350, true);

6. }

How to Add a Featured Image to a WordPress Post or Page?

 

An image can be set as featured image in wordpress easily. The first step is to scroll down on the right hand side to locate the “Set Featured Image” area of the edit post screen. Once it is clicked a new dialog box will pop up to select and upload image files. They can be dragged and dropped or selected by clicking the “Select Files” button. The images can be selected from the computer or from URLs or from media libraray.The image file format should be .png,.gif or .jpeg.In the new edit image screen, a title, link, and a description can be entered particularly if one wants to optimize the post for SEO.The size of the image selected should be full size and the alignment can be set to none. Click on “Use as Featured Image” and then click on “Save All Changes”. Close the edit image window and return to the write post screen. The featured image will now be shown on the top of the set featured image area of the edit panel. The featured image is now set in the wordpress post. Click publish or click preview if wants to change or edit the image. The location of the featured image on the wordpress site will depend on the theme installed.

 

View ratings
Rate this article
Share

Tags: , , ,

Let us know what you think about this article!