Theme customizer – can’t add section/settings
-
I’m trying to modify the WordPress theme customizer by adding sections and settings but no matter what I add in my functions.php file, nothing ever shows up in the customizer.
Here is my code:-
function starter_customize_register( $wp_customize )
{
$wp_customize->add_panel( ‘home_page_settings’, array(
‘title’ => __( ‘Home Page Settings’, ‘starter’),
‘priority’ => 10,
‘active_callback’ => ‘is_front_page’
) );$wp_customize->add_section( ‘home_call_to_action_section’ , array(
‘title’ => __(‘Call To Action’,’starter’),
‘panel’ => ‘home_page_settings’,
) );$wp_customize->add_setting( ‘home_call_to_action_setting_section’, array(
‘default’ => __(‘WHAT IS RO PURIFIER?’, ‘starter’),
‘sanitize_callback’ => ‘starter_sanitize’,
));
$wp_customize->add_control(‘cta_heading’, array(
‘label’ => __(‘CTA Heading’,’starter’),
‘section’ => ‘home_call_to_action_section’,
‘setting’=>’home_call_to_action_setting_section’));
}
add_action( ‘customize_register’, ‘starter_customize_register’);
- The topic ‘Theme customizer – can’t add section/settings’ is closed to new replies.