Title: Change default settings
Last modified: August 30, 2016

---

# Change default settings

 *  [orvokki](https://wordpress.org/support/users/orvokki/)
 * (@orvokki)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/change-default-settings-4/)
 * Hello,
 * how can I change the default settings of the gallery?
 * I’ve already tried it in wc-gallery/includes/functions.php but it doesn’t work:
 *     ```
       extract(shortcode_atts(array(
       		'order'      => 'ASC',
       		'orderby'    => 'menu_order ID',
       		'id'         => $post ? $post->ID : 0,
       		'captions'   => 'hide',
       		'captiontype' => 'p',
       		'columns'    => 4,
       		'gutterwidth' => '5',
       		'link'       => 'post',
       		'size'       => 'thumbnail',
       		'targetsize' => 'large',
       		'display'    => 'masonry',
       		'customlink' => 'false',
       		'bottomspace' => 'default',
       		'hidecontrols' => 'false',
       		'newtab' => 'false',
       		'class'	     => '',
       		'include'    => '',
       		'exclude'    => ''
       	), $attr, 'gallery'));
       ```
   
 * Thanks in advance!
 * [https://wordpress.org/plugins/wc-gallery/](https://wordpress.org/plugins/wc-gallery/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [orvokki](https://wordpress.org/support/users/orvokki/)
 * (@orvokki)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/change-default-settings-4/#post-6639248)
 * anyone?:(
 *  [1000camels](https://wordpress.org/support/users/1000camels/)
 * (@1000camels)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/change-default-settings-4/#post-6639354)
 * Hi orvokki,
 * Any luck setting the default? I too wish to do this.
 *  Thread Starter [orvokki](https://wordpress.org/support/users/orvokki/)
 * (@orvokki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/change-default-settings-4/#post-6639356)
 * Hi, sorry for such a late response.
 * Columns and linking are default WP options thus I added the following code to
   functions.php:
 *     ```
       function theme_gallery_defaults( $settings ) {
           $settings['galleryDefaults']['columns'] = 4;
           $settings['galleryDefaults']['link'] = 'file';
           return $settings;
       }
       add_filter( 'media_view_settings', 'theme_gallery_defaults' );
       ```
   
 * When it comes to other settings, they are to be found in the plugin’s files. 
   For example, to hide captions you have to change wc-gallery\includes\functions.
   php (line 521):
 *     ```
       <label class="setting">
       			<span><?php _e( 'Captions', 'wc_gallery' ); ?></span>
       			<select class="captions" name="captions" data-setting="captions">
       				<?php foreach ( $captions as $key => $value ) : ?>
       					<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'onhover' ); ?>><?php echo esc_html( $value ); ?></option>
       				<?php endforeach; ?>
       			</select>
       		</label>
       ```
   
 * chanage ‘onhover’ to ‘hide’
 * Disadvantage: will work till the next update… 🙁

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change default settings’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wc-gallery_ffffff.svg)
 * [Galleries by Angie Makes](https://wordpress.org/plugins/wc-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-gallery/reviews/)

## Tags

 * [change](https://wordpress.org/support/topic-tag/change/)
 * [default settings](https://wordpress.org/support/topic-tag/default-settings/)

 * 3 replies
 * 2 participants
 * Last reply from: [orvokki](https://wordpress.org/support/users/orvokki/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/change-default-settings-4/#post-6639356)
 * Status: not resolved