Support » Plugins » How can I remove "Active Theme" section from Customizer?

  • My multisite has only one theme which each site admin can customize to their own liking. Thus, no need for the Active Theme panel and certainly no need for the button to change the theme, because there are no other themes to change to. How can I remove the Active Theme section from Customizer? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I got it working with this…

    <?php
    function remove_theme_selector( $wp_customize ) {
      $wp_customize->remove_section('themes');
    }
    add_action( 'customize_register', 'remove_theme_selector' );
    ?>

    Yay! 😀

    Because this is the first hit on google, here’s more information, you need to set at least a priority of 20 to the code:

    function remove_customizer_settings( $wp_customize ){
    
    	$wp_customize->remove_panel('widgets');
    	$wp_customize->remove_panel('nav_menus');
    	$wp_customize->remove_section('themes');
    }
    add_action( 'customize_register', 'remove_customizer_settings', 20 );

    and if you’re using multisite, and want to keep your super admins ability to see that section, then:

    function remove_customizer_settings( $wp_customize ){
    if ( is_super_admin() ) {
    
    } else {
    	$wp_customize->remove_panel('widgets'); // ok
    	$wp_customize->remove_panel('nav_menus');
    	$wp_customize->remove_section('themes');
    }
    }
    add_action( 'customize_register', 'remove_customizer_settings', 20 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I remove "Active Theme" section from Customizer?’ is closed to new replies.