skip to Main Content

Add Customizer Settings

// Add new settings to the Customizer Total panels.
function myprefix_customizer_settings( $sections ) {
	
	// Add new setting under the header > logo section
	$sections['wpex_header_logo']['settings']['myprefix_setting_id'] = array(
		'id' => 'myprefix_setting_id',
		'default' => 'default_value',
		'control' => array(
			'label' => __( 'Setting Name', 'total' ),
			'type' => 'text', // text, checkbox, textarea, dropdown, number, wpex-heading, wpex-fa-icon-select, wpex-sortable
			'choices' => array(), // used for dropdowns
		),
	);

	// Return settings
	return $sections;

}
add_filter( 'wpex_customizer_sections', 'myprefix_customizer_settings' );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top