Enable Post Thumbnails in Your WordPress Theme

If you want to have post thumbnails appear on your homepage, it’s very easy to add this to your WordPress theme ever since 2.9. Just open functions.php and add:

1
add_theme_support( 'post-thumbnails' );

Then within your homepage template add the following tag:

1
<?php the_post_thumbnail(); ?>

Now you’ll be able to set the Featured Image or the Thumbnail Image for the post. The settings for this are in a widget that will appear in right sidebar of the post editor just below categories and tags. More information about how use post thumbnails and adjust their default sizes can be found at Mark Jaquith’s tutorial on the subject.

Tags

Comments (8)

  1. I got in my loop, but not add_theme_support( ‘post-thumbnails’ ); in my functions.

    This is the platform theme. I use a plugin which makes feautred images automatically, there is no support for it. They say my theme must support wp thumbnails.

    Can you please assist how to proceed. Do you know this theme?

Participate