I will show how to change the default settings of the WP Gallery. I mean, the number of columns, size and the link. WordPress Galleries usually default to using the thumbnail size of 150 x 150 (px) and 3 columns across.
1) Open up the functions.php file in in the wp-content/themes/your-theme-directory
2) Copy and paste the code below to your theme functions.php
[code] //Galerie Settingfunction my_gallery_default_type_set_link( $settings ) {
$settings['galleryDefaults']['link'] = 'file';
$settings['galleryDefaults']['size'] = 'medium';
$settings['galleryDefaults']['columns'] = '2';
return $settings;
}
add_filter( 'media_view_settings', 'my_gallery_default_type_set_link');
[/code]
This function changes the default attributes for the gallery to be columns=”2″ and size=”medium”.