Skip to content

Instantly share code, notes, and snippets.

@richerimage
Created April 15, 2014 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richerimage/10734179 to your computer and use it in GitHub Desktop.
Save richerimage/10734179 to your computer and use it in GitHub Desktop.
Add custom images sizes to wordpress
add_image_size( 'Letterbox Large', 851, 315, true );
add_image_size( 'Icon', 75, 75, true );
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'Letterbox Large' => __('Letterbox Large'),
'Icon' => __('Icon'),
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment