Removing Sections/Panels

Customizer panels and sections can be easily removed. Below we will discuss how this is done.

See the related hook: customize_loaded_components

First, a bit of terminology. What is the difference between a "section" of the customizer and a "panel"? A panel is a tab that contains nested tabs (subtabs), while a section is a tab that does not have nested tabs (it contains the fields - customizer controls). For example, the main tab is a panel because it has nested tabs. See the picture:

Panel General with various sections in it

Below is a table showing what relates to panels and what relates to sections.

Here is the code that can be used as a template. The code creates a hook that removes the Presets section from the customizer.

// Remove the customizer section 'presets'
add_action( 'customize_register', 'my_customize_register', 11 );

function my_customize_register( WP_Customize_Manager $wp_customize ){
	$wp_customize->remove_section( 'presets' );
}

To remove the panel or section you need, you need to modify the code as follows:

  • To remove a panel instead of a section, use the method remove_panel() instead of remove_section().
  • Change the panel/section identifier presets to the one you want to remove. See the table below.
  • Add the code to your theme's functions.php file.

Table of WordPress Customizer Sections and Panels

To use the example code above, it is necessary to know whether what we want to remove is a panel or a section and what its ID is.

Panels

ID Title Priority (Order)
themes Theme Name 0
nav_menus Menus 100
widgets Widgets 110

Sections

ID Title Priority (Order)
menu_locations __( 'View Location' ) 30
add_menu __( 'New Menu' ) 20
installed_themes __( 'Installed themes' ) 0
wporg_themes __( 'WordPress.org themes' ) 5 (multisite)
title_tagline __( 'Site Identity' ) 20
colors __( 'Colors' ) 40
header_image __( 'Header Image' ) 60
background_image __( 'Background Image' ) 80
static_front_page __( 'Homepage Settings' ) 120
custom_css __( 'Additional CSS' ) 200