Created
April 24, 2013 04:01
-
-
Save jayseventwo/5449532 to your computer and use it in GitHub Desktop.
Create a custom size for your new image uploads. Add to functions.php
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
// custom image size for slider | |
if ( function_exists( 'add_image_size' ) ) { | |
add_image_size( 'new-size', 900, 400, true ); //(add new size here) | |
} | |
add_filter('image_size_names_choose', 'my_image_sizes'); | |
function my_image_sizes($sizes) { | |
$addsizes = array( | |
"new-size" => __( "New Size") | |
); | |
$newsizes = array_merge($sizes, $addsizes); | |
return $newsizes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment