Title: WP_Customize_Manager::add_section
Published: April 25, 2014
Last modified: February 24, 2026

---

# WP_Customize_Manager::add_section( WP_Customize_Section|string $id, array $args = array() ): 󠀁[WP_Customize_Section](https://developer.wordpress.org/reference/classes/wp_customize_section/)󠁿

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#wp--skip-link--target)

Adds a customize section.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#see-also)󠁿

 * [WP_Customize_Section::__construct()](https://developer.wordpress.org/reference/classes/WP_Customize_Section/__construct/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#parameters)󠁿

 `$id`[WP_Customize_Section](https://developer.wordpress.org/reference/classes/wp_customize_section/)
|stringrequired

Customize Section object, or ID.

`$args`arrayoptional

Array of properties for the new Section object.
 See [WP_Customize_Section::__construct()](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/)
for information on accepted arguments.

Default:`array()`

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#return)󠁿

 [WP_Customize_Section](https://developer.wordpress.org/reference/classes/wp_customize_section/)
The instance of the section that was added.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#source)󠁿

    ```php
    public function add_section( $id, $args = array() ) {
    	if ( $id instanceof WP_Customize_Section ) {
    		$section = $id;
    	} else {
    		$section = new WP_Customize_Section( $this, $id, $args );
    	}

    	$this->sections[ $section->id ] = $section;
    	return $section;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-manager.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-manager.php#L3997)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-manager.php#L3997-L4006)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Customize_Section::__construct()](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/)`wp-includes/class-wp-customize-section.php` |

Constructor.

  |

| Used by | Description | 
| [WP_Customize_Manager::register_controls()](https://developer.wordpress.org/reference/classes/wp_customize_manager/register_controls/)`wp-includes/class-wp-customize-manager.php` |

Registers some default controls.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.5.0](https://developer.wordpress.org/reference/since/4.5.0/) | Return added [WP_Customize_Section](https://developer.wordpress.org/reference/classes/wp_customize_section/) instance. | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_manager%2Fadd_section%2F)
before being able to contribute a note or feedback.