Registers a new post_thumbnail size
add_image_size( $name, $width = 0, $height = 0, $crop = FALSE)
A theme's functions.php file.
if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' ); if ( function_exists( 'add_image_size' ) ) { add_image_size( 'cat-thumb', 200, 200 ); add_image_size( 'search-thumb', 220, 180, true ); }
Child Theme Usage
Simply copy & paste the following line to your child themes functions file and modify the values for the width and height.
add_image_size( 'name-your-image', 220, 180, true );
Within a theme's template files.
<?php if ( has_post_thumbnail()) the_post_thumbnail('cat-thumb'); ?>
Defined in wp-includes/media.php