WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Class Reference/WP Customize Manager/remove section

Description

Removes a section from the Theme Customization admin screen.

This is a method of the WP_Customize_Manager class and can only be accessed through the $wp_customize object within the customize_register action hook.

Usage

$wp_customize->remove_section($id);

Parameters

$id
(string) (required) The section to delete (must already exist).
Default: None

Default Sections

WordPress does include a few built-in sections. The following sections are built-in...

  • title_tagline - Site Title & Tagline
  • colors - Colors
  • header_image - Header Image
  • background_image - Background Image
  • nav - Navigation
  • static_front_page - Static Front Page

Example

Removing a theme section (within the 'customize_register' action) might look like this:

$wp_customize->remove_section( 'mytheme_new_section_name' );

Related

See also index of Class Reference and index of Function Reference.