Function:
if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions } if ( function_exists( 'add_image_size' ) ) { add_image_size( 'review-thumbnail', 150, 200, true ); add_image_size( 'movies-thumbnail', 400, 9999 ); }
Template code:
<?php echo get_the_post_thumbnail($post->ID, 'medium'); ?>
No comments:
Post a Comment