Return to Snippet

Revision: 53603
at November 29, 2011 09:15 by f6design


Initial Code
/**
 * Enable post thumbnails.
 */
if ( function_exists( 'add_theme_support' ) ) { 
	add_theme_support( 'post-thumbnails', array( 'project' ) ); // Add support for posts
	add_image_size( 'large-feature-image', 715, 402, true ); // large size, hard crop mode
}

Initial URL

                                

Initial Description
This snippet adds support for post thumbnails (a.k.a. 'featured images') to a Wordpress theme. It also adds an additional image size for image thumbnails, hard cropped. This second step is optional.

Add this snippet to your WP theme's functions.php file.

Initial Title
Enable post thumbnails for a Wordpress theme

Initial Tags
wordpress, images

Initial Language
PHP