• Resolved jayhawkerd

    (@jayhawkerd)


    Is there a way to remove some of the sections from the customizer page like menu primary, entry meta? I know with the regular customizer I could remove by saying$wp_customize->remove_section('title_tagline'); but that doesn’t seem to work with these new options (I tried st_searchform but it didn’t work).

    https://www.ads-software.com/plugins/styles/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paul Clark

    (@pdclark)

    Your code is probably running before the sections get added. Your ID is correct. I tested this and it works:

    function remove_styles_sections(){
        global $wp_customize;
    
        $wp_customize->remove_section('st_searchform');
    }
    
    // Priority 20 so that we remove options only once they've been added
    add_action( 'customize_register', 'remove_styles_sections', 20 );

    Alternatively, you can copy customize.json to your theme directory, styles.css to your theme styles (if it exists), then disable the theme add-on plugin and edit customize.json to remove whatever you’d like. Each line is one option or group.

    Thread Starter jayhawkerd

    (@jayhawkerd)

    Thank you. That worked!

    Plugin Author Paul Clark

    (@pdclark)

    Great! I’m glad we could get it resolved for you. ??

    Please take a moment to submit a review. It helps a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove sections from customizer page’ is closed to new replies.