• Resolved echapp

    (@echapp)


    Hi guys,
    Congrats for Zerif! It’s an amazing theme!

    I’m having a problem developing a zerif-lite’s child theme.
    I can’t remove some sections in customizer.
    I tried doing the same steps as other child themes of zerif-lite like zifer and responsive boat but it just doesn’t work, I don’t know why…I guess I’m missing something really obvious.

    I just want to remove some sections, controls and settings from the parent theme.

    This is my functions.php, and the code above doesn’t work on my child theme, all i want to remove is still there

    add_action('customize_register', 'my_customizer');
    function my_customizer($wp_customize)
    {
        /*************  OUR FOCUS SECTION ******************/
        $wp_customize->remove_section( 'zerif_ourfocus_section');
        /* show/hide */
        $wp_customize->remove_setting( 'zerif_ourfocus_show');
        $wp_customize->remove_control( 'zerif_ourfocus_show');
        /* our focus title */
        $wp_customize->remove_setting( 'zerif_ourfocus_title');
        $wp_customize->remove_control( 'zerif_ourfocus_title');
        /* our focus subtitle */
        $wp_customize->remove_setting( 'zerif_ourfocus_subtitle');
        $wp_customize->remove_control( 'zerif_ourfocus_subtitle');
    
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter echapp

    (@echapp)

    Hi,

    It was not working because the priority argument was not defined.

    add_action( 'customize_register', 'my_customizer', 11 );

    Alexandra

    (@alexandrastan001)

    Hello,

    Glad that you got it fixed and thank you for sharing your solution with us.

    Best regards,
    Alexandra

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove customizer section from parent theme’ is closed to new replies.