How to Enable Different Sizes of Post Thumbnails on your WordPress Blog
After version 2.9, wordpress have now a built in function that allows to easily embed thumbnail images into blog posts.
I think this feature is very well known nowdays, however there are some other features about that function that not many people know about, that you can, for instance, create many different sizes of images that are also created when you use the thumbnail system.
For example, lets say you want the same thumbnail to be shown in 3 different sizes, depending where the user is now. One image size for the Post itself, another for the Home Page of your site and other for the Category visualization, all those images are different in sizes.
Just open your functions.php file of your theme and insert the desired sizes with a corresponding name. Example:
add_theme_support( 'post-thumbnails' ); //don't forget to enable the post-thumbnails system on your site< add_image_size( 'post-thumb', 300, 300, true ); add_image_size( 'home-thumb', 200, 200, true ); add_image_size( 'category-thumb', 50, 50, true );
Now, when you upload a image and associate it with the Thumbnail it will create a thumb with the 3 sizes, in order to use it just open the theme file that you want to show the thumb and call it by the name defined in the add_image_size function, like that:
the_post_thumbnail('post-thumb');
And that's all, just repeat the processes anywhere you want the image to be shown, couldn't be easier than that