• Hello,

    I use my child theme to remove some panels and sections from customizer.

    This worked in 3.4.37 version:

    
    function abcdefg_customizer( $wp_customize ) {
    	$wp_customize->remove_panel( 'tc-footer-panel' );
    	$wp_customize->remove_panel( 'tc-advanced-panel');
    	$wp_customize->remove_panel( 'tc-sidebars-panel');
    	$wp_customize->remove_panel( 'tc-global-panel');
    	$wp_customize->remove_panel( 'tc-header-panel');
    		
    	$wp_customize->remove_section('go_pro_sec');
    	$wp_customize->remove_section('themes');
    	$wp_customize->remove_section('frontpage_sec');
    	$wp_customize->remove_section('post_layout_sec');
    	$wp_customize->remove_section('post_lists_sec');
    	$wp_customize->remove_section('single_posts_sec');
    	$wp_customize->remove_section('breadcrumb_sec');
    	$wp_customize->remove_section('post_metas_sec');
    	$wp_customize->remove_section('galleries_sec');
    	$wp_customize->remove_section('paragraphs_sec');
    	$wp_customize->remove_section('comments_sec');
    	$wp_customize->remove_section('post_navigation_sec');
    }
    add_action( 'customize_register', 'abdefg_customizer', 1000 );
    

    remove_section() works even now in 4.0.13 version, but only for go_pro_sec, the themes section is still there.

    remove_panel() doesn’t work at all, it throws js error in console and the customizer wont load at all.

    This is the JS error: Uncaught TypeError: Cannot read property ‘expanded’ of undefined

    Please help, I need to hide those sections for my client ASAP.

    Thank you

  • The topic ‘Remove panels and sections from customizer’ is closed to new replies.