Created
March 12, 2014 20:13
-
-
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.
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
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