How to Add Post Thumbnails in WordPress

Interactive Online > Blog  > CMS  > WordPress  > How to Add Post Thumbnails in WordPress

How to Add Post Thumbnails in WordPress

In this article we will show you how you can utilize the new feature added in WordPress 2.9 to add post thumbnails easier than before.

How to Add Post Thumbnails in WordPress is a post from: WPBeginner which is not allowed to be copied on other sites.

Related posts:

  1. How to Display Featured Posts with Thumbnails in WordPress
  2. How to: Related Posts with Thumbnails in WordPress without Plugins
  3. Most Notable Features in WordPress 2.9


Post Thumbnails are getting more popular every day. Many magazine themes associate an image with a specific post which they later display on either homepage or on the post page. We display a thumbnail with our posts on both the post page and the category page. In older versions, this functionality was obtained with the use of custom-field method which was not very user friendly. Thanks to WordPress Core Developers along with many notable features in WordPress 2.9, this function was also added to the core.

Post Thumbnails in WordPress

You will see an option like this in the sidebar of your Write Post Panel in WordPress Dashboard. Even though this functionality is added to the core, not every user will see this option in the sidebar of their write post panel. This is one of those functions that can be enabled only if the theme supports it. Older free themes might not support it, so you would need to ask the developer to update, or you can do it yourself by following this tutorial.

First you will need to open your functions.php file in your themes folder and paste the following code:

add_theme_support( 'post-thumbnails' );

This code will enable theme support for both posts and pages. So now you will be able to see an option in your dashboard. But it will not display in your themes because we have not added the code in the theme yet.

You can display the thumbnail anywhere inside the Loop by using this code:

<?php the_post_thumbnail(); ?>

That was the basic function, but if you want to get more advanced such as specifying post thumbnail size then you will just need to open your functions.php file and paste the code like this:

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 50, 50, true );

The dimensions are set in this order: width x height and these are pixels.

This is broken down version of the full functionality of this feature. We tried to keep it simple, so every one can follow it. If you want more information on this functionality then check out:

Mark Jaquith’s Article on Post Thumbnails
WordPress Codex

How to Add Post Thumbnails in WordPress is a post from: WPBeginner which is not allowed to be copied on other sites.

Related posts:

  1. How to Display Featured Posts with Thumbnails in WordPress
  2. How to: Related Posts with Thumbnails in WordPress without Plugins
  3. Most Notable Features in WordPress 2.9

read more..
Free Website for Your Dental Practice
See why our dental practice websites exceed the features & value of your typcial dentist website.
  • No cookie-cutter websites
  • No duplicate content
  • Custom built with a unique look and feel
  • Unique content written by professional writers
  • Set yourself apart from other dentists
  • The key to your online success!
* we never share your e-mail with third parties.