Posted on 12 May, 2011 By 6 Comments

How to Add a Default Image for WordPress Post Thumbnails

 

Since version 2.9 WordPress has supported Post Thumbnails, which are used to assign an image to a post so they can be used in different parts of the theme and are frequently used in magazine style layouts. Prior to post thumbnails, custom fields were frequently used to do this.

I used to use the Thumbnails for Excerpts plugin to improve the layout of my search results page and my archives. For some time I’ve wanted to use Post Thumnails instead but the thought of adding them to all of my older posts seemed like a daunting task.

Recently, however, I added Post Thumbnails to my theme and deactivated the Thumbnails for Excerpts plugin even though many of my older posts would not have a post thumbnail image. I’ve added an image to some of the older posts and I’ve been adding them to all new posts.

This morning when I was walking home from dropping my daughter off at school I was thinking about Post Thumbnails (do I know how to have fun or what) because I’ve been asked a couple of questions about them. I then thought maybe there is a way to set a default image so if you haven’t added one to a particular post the default image will be used. And, of course, I located a plugin as well as instructions for adding a default post thumbnail to your theme manually.

The plugin

I did a quick test of the plugin, called Default Post Thumbnails (now, there’s a surprise), and it worked great.

  1. Install and activate the plugin.
  2. Go to Settings > Default Post Thumbnail.
  3. The screen will show all of the images in your media library and you can select the one that you want to use as the default. If the image you want to use isn’t already in the media library, you will want to add it and then come back to this screen.
  4. I decided to select a recent picture I took of a rainbow but your site’s logo might be another good choice.
  5. In the Featured Image area of your Edit Post screen the featured image you have selected for the post will be displayed as well as the default one. The default image has a message saying it’s the default image that will be used if one isn’t selected.

Now when I go to my archives or search results page, posts without an image selected for the Post Thumbnail use the image with the rainbow that I selected. Here is an example of a search on the word facebook – if you scroll down, you will see that the oldest posts all use this image.

So, for now, my problem is solved. At least until I get motivated to add a Post Thumbnail to my older posts.

Do you use post thumbails? Has the issue for older posts kept you from using them? Do you think a default image is a useful solution?

photo credit: mikecogh




Keep Reading:
Posted In : WordPress Plugins | 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.




6 Responses to “How to Add a Default Image for WordPress Post Thumbnails”

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