banner ad

How to Add Post Thumbnails to Your Posts

| November 22, 2010 | 0 Comments

If you look at the home page of this site, you’ll see that each post below the featured articles has a thumbnail image next to it. Adding thumbnail images to your posts is pretty simple, and here’s all you need to do.

Install and Activate the “Get The Image” Plugin

This plugin, created by a savvy WordPress developer named Justin Tadlock, will greatly simplify the task of placing your post thumbnail images right where they belong.

Download the plugin here or add it through your WordPress control panel. Install and activate.

The plugin will search for images in the following order:

1. First, it will look for an image by custom field (custom field name: thumbnail).

2. If no image is added by custom field, it will check for and image defined as the “featured image” on the Add Post screen (WordPresss 2.9+ feature).

3. If no image is found in either of those places, it will look for an image that you’ve uploaded to the post. If you’ve uploaded multiple images to your post, it will use the #1 image as set in the gallery section of your media uploader (click thumbnail to the right).

4. If no image is attached, it will extract an image from your post content.

5. Finally, if no image is found via any of those methods, the default image will be displayed unless you deactivate that function on the theme settings page.

Help, My Images Are Not Showing Up

If you’ve activated the plugin and your thumbnails or featured article images are not appearing, it’s likely do to one of the following issues related to the timthumb script which automatically re-sizes your images:

1. Your image cache folder is not writeable by your server. In this case, the folder that contains your thumbnails and featured images is not accessible by the timthumb script. The solution is to change the folder’s permissions. You can do this by using an FTP program to CHMOD the /scripts/cache folder found within your theme folder. The folder permissions will need to be set at either 755 or 777 (depending on your web server setup).

2. Your web host’s security settings are blocking the timthumb script. Some web host have various default security settings that prevent the timthumb script from functioning properly (Hostgator is an example).

You’ll need to contact your web host’s technical support, and tell them you are trying to use the timthumb script on a WordPress site, but you believe there is a security setting that is preventing it from functioning. They should be able to correct the problem very quickly.

Category: Tutorials

About the Author (Author Profile)

This is the Biographical Info field in the WordPress user profile. You should write something here. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quis risus at nisl blandit feugiat. Ut vel orci quis sem dapibus iaculis. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.