Created
March 14, 2012 17:57
-
-
Save adamcbrewer/2038232 to your computer and use it in GitHub Desktop.
WP: Create A Custom Post-thumbnail Size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Location: functions.php | |
* | |
*/ | |
// drop in functions.php | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
add_theme_support( 'post-thumbnails', array('post', 'movie')); // include array of post_types (including registered ones) | |
// more info: http://codex.wordpress.org/Function_Reference/add_image_size | |
add_image_size( | |
'custom-size', // name | |
279, // width | |
9999, // height | |
true // hard or soft crop | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment