WordPress 2.9 Changes to Post Thumbnails

The world of WordPress Development is constantly changing. As well it should. No surprise there. Several days ago, I posted an article how to add the post thumbnail feature on your themes for the upcoming WordPress 2.9, which is currently in Beta.

Previously, the code for themes was:

<?php the_post_image( ‘post-thumbnail’ ); ?>

It has changed to:

<?php the_post_thumbnail( ‘post-thumbnail’ ); ?>

The entry in functions.php is still the same. This code activates post thumbnails feature. In case you’ve forgotten, it’s:

if ( function_exists( ‘add_theme_support’ ) )
add_theme_support( ‘post-thumbnails’ );

Lastly, Technosailor talks about the changes for WordPress 2.9. Great read.

Upgrade Your Theme To Support WordPress 2.9

WordPress 2.9 is just around the corner. It will be here before we know it. There are a number of new features in WordPress 2.9. The inclusion of “post thumbnails” is first and foremost. It allow bloggers to upload thumbnail images associated with their posts. Theme designers and users have several choices as to what thumbnail image size to display, whether the default thumbnail size, medium, large or full, the original size uploaded.

Another feature that has made it to WordPress 2.9 is the addition of the trash feature for posts, pages and comments. It’s similar to the trash can feature found in Windows and Linux operating systems. It allow bloggers to recover posts, pages and comments that were previously deleted.

Also included with WordPress 2.9 is the addition of the basic image editing features in the Media Library. Users will be able to rotate, crop, flip and scale an image. This particular post focuses on what you need to do to get your theme supported in WordPress 2.9. I will show you how to make changes in your current theme to support the thumbnail images.

To activate thumbnail support, you need to add this line of code to functions.php.


Next, you need to edit your index.php and single.php pages or any page where you want the thumbnail images to be displayed. Add this line of code.

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

For medium size:

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

For large size:

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

For full image:

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

That’s it. Get a head start. Make your theme changes now.