Skip to content

Snippet: Set Default Customizer Settings Via Child Theme

  * Set default settings when switching themes
  * See all default setting id's at framework/customizer/settigs/[base].php
function my_default_total_settings() {

	// Set footer to 2 widgets
	set_theme_mod( 'footer_widgets_columns', '2' );

	// Disable topbar
	set_theme_mod( 'top_bar', '' );

add_action( 'after_switch_theme', 'my_default_total_settings' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top