Skip to content

Instantly share code, notes, and snippets.

@seancojr
Created March 12, 2014 20:13
Show Gist options
  • Save seancojr/9515332 to your computer and use it in GitHub Desktop.
Save seancojr/9515332 to your computer and use it in GitHub Desktop.
How to set the default image size in WordPress galleries From http://www.wprecipes.com/how-to-set-the-default-image-size-in-wordpress-galleries The desired size can be changed on line 5.
remove_shortcode('gallery');
add_shortcode('gallery', 'custom_size_gallery');
function custom_size_gallery($attr) {
$attr['size'] = 'medium';
return gallery_shortcode($attr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment