Skip to content

Instantly share code, notes, and snippets.

@jayseventwo
Created April 24, 2013 04:01
Show Gist options
  • Save jayseventwo/5449532 to your computer and use it in GitHub Desktop.
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
// 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