Return to Snippet

Revision: 24178
at February 22, 2010 16:37 by peterbelsky


Initial Code
add_theme_support( 'post-thumbnails' );

or 

add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages

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

<?php
if ( has_post_thumbnail() ) {
	// the current post has a thumbnail
} else {
	// the current post lacks a thumbnail
}
?>


<?php the_post_thumbnail(); ?>

Initial URL
http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/

Initial Description

                                

Initial Title
Post Thumbnail Images

Initial Tags
wordpress

Initial Language
PHP