Skip to content

Instantly share code, notes, and snippets.

@xafarali
Created June 9, 2013 22:11
Show Gist options
  • Save xafarali/5745464 to your computer and use it in GitHub Desktop.
Save xafarali/5745464 to your computer and use it in GitHub Desktop.
Add Thumbnail Sizes
/* FEATURED THUMBNAILS */
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
add_theme_support( 'post-thumbnails' );
}
add_image_size('small-thumbnail', 80, 80, true);
/* ===============================================
--------- Custom Thumbnail sizes --------------
================================================== */
//set up thumbs
function thumb_setup() {
add_theme_support('post-thumbnails');
#add custome height ( name , width , height , crop )
add_image_size('grid-thumb', 100, 100, true);
$custom_sizes = array(
'grid-thumb' => 'Grid Thumb'
);
///return array_merge($sizes, $custom_sizes);
}
/* Custom MEDIA SIZES*/
add_action('after_setup_theme', 'thumb_setup');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment