Posted on 8 April, 2010 By 11 Comments

How to Add the Post Thumbnail Feature to your WordPress Installation

 

importance of a nail (by red twolips)

One of the new features in WordPress 2.9+ was support for the Post Thumbnail feature. Unfortunately, this doesn’t work by default and the function and code need to be added to the theme so that the feature is available. Once it is available, however, it is really super useful.

If you aren’t comfortable editing your template files, find someone who will do this for you. Some newer themes have this functionality already built in.

  1. Add the following code to your functions.php file

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

    I recommend making a copy of the file before editing it – I’ve messed up my functions file plenty of times ;-)

  2. You will now see the Post Thumbnail box on your Edit/Add New post screen. It will be on the bottom right column.
  3. Click on Set thumbnail and you can upload an image the way that you normally do. Instead of clicking on the Insert Into Post button, click on the Use as Thumbnail link and then Save.

    The image will be displayed in the Post Thumbnail box.
  4. You now have a Post Thumbnail image but it doesn’t show up on your site. The code needs to be added to the template file where you want it displayed.
    The code is

    <?php the_post_thumbnail(); ?>
    
  5. Currently I use the Thumbnails for Excerpts plugin to display a thumbnail image in my archives. I plan on adding the post thumbnail code and using the post thumbnail rather than being dependent on the plugin. I would add the code next to the code that displays the excerpt. Of course, since I have over 400 posts this will be quite an undertaking.

As I mentioned this will should already be available on newer themes. If you are using an older theme and want to use this feature, you will need to add the code manually.

photo credit: red twolips


StudioPress Premium WordPress Themes

Keep Reading:
Posted In : WordPress Tips

Did you enjoy this article? I can assist you with your WordPress or Facebook project. Contact me and I will provide you with an estimate. You can also connect with me on Facebook or follow me on Twitter. If you are looking for Hosting, WordPress Theme, Newsletter or other recommendations, please view my detailed list.




11 Responses to “How to Add the Post Thumbnail Feature to your WordPress Installation”

Trackbacks/Pingbacks
  1. » Blog Archive » Still Setting Up Here
  2. How to Use Captions with WordPress Post Thumbnails | WordPress and Facebook Consultant | (Anti) Social Development
Leave a Comment
You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

CommentLuv badge

About

Kim Woodbridge is an accomplished Information and Technical Consultant specializing in the entire implementation of a WordPress based website including installation, theme design, upgrades, unique customizations and ongoing site maintenance.

Recent Comments

    • Chris Tusa: NovelSnippet.com is cool. It contains hundreds of books (and seems to be rapidly growing). The books are accompanied by ...
    • Dee: I drop a leave a response when I especially enjoy a post on a site or I have something to contribute to the conversation...
    • Kabsiha: Thanks for your great idea to hide the deactivated comment link in word press this would be the very useful post for who...
    • Pat Alexander: Well now these are really great. Makes it perfect for small sites....
    • Tracy G: I really don't know how to do it, glad you posted it here....

Wordpress Services

  • Installation, upgrades and maintenance
  • Conversion of existing html and css templates
  • Theme and plugin recommendations
  • CSS customizations
  • Troubleshooting and tweaks for unique situations
  • Customization for individual blogging goals and needs
  • Training and advice