Skip to content

Instantly share code, notes, and snippets.

@adamcbrewer
Created March 14, 2012 17:57
Show Gist options
  • Save adamcbrewer/2038232 to your computer and use it in GitHub Desktop.
Save adamcbrewer/2038232 to your computer and use it in GitHub Desktop.
WP: Create A Custom Post-thumbnail Size
<?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