Daily Tip: How to Change the Post Thumbnail Size in a WordPress Theme

August 2, 2010  | 
3 Comments

If you enable post thumbnails for your theme, you will find that you may not like the default size. If you want all of your post thumbnail images to be the same size throughout your theme, then you can set it in functions.php:

set_post_thumbnail_size( 100, 100 ); // 100 pixels wide by 100 pixels tall, box resize mode

OR:

set_post_thumbnail_size( 100, 100, true ); // 100 pixels wide by 100 pixels tall, hard crop mode

However, if you want to have different image sizes for archives, custom category pages, posts, and custom post types, you can set them directly within the template tag, like so:

<?php the_post_thumbnail('thumbnail'); ?>

You can select from the following options:

the_post_thumbnail();                  // without parameter -> Thumbnail

the_post_thumbnail('thumbnail');       // Thumbnail
the_post_thumbnail('medium');          // Medium resolution
the_post_thumbnail('large');           // Large resolution

the_post_thumbnail( array(100,100) );  // Other resolutions

For more information on post thumbnails, check out the WordPress codex or Mark Jaquith’s in-depth tutorial on how to use them.

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

3 Responses to Daily Tip: How to Change the Post Thumbnail Size in a WordPress Theme

  1. Pingback: ArcIris · WordPress Random Posts With Thumbnails

  2. I just can’t get this to work. can’t say why. I have defined the size I want to use as default but nothing happens. Even when I use the size feature *full size it still doesn’t do anything.

  3. i want meke my Post Thumbnail Size like this http://www.simplewpthemes.com/demo/theme/
    from Post Thumbnail Size like http://wpdemo.templatepanic.com/?themedemo=Spice-Media

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting