Created
June 9, 2013 22:11
-
-
Save xafarali/5745464 to your computer and use it in GitHub Desktop.
Add Thumbnail Sizes
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
/* 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