Title: default_wp_template_part_areas
Published: February 3, 2022
Last modified: August 20, 2026

---

# apply_filters( ‘default_wp_template_part_areas’, array[] $default_area_definitions )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#user-contributed-notes)

Filters the list of allowed template part area values.

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

 `$default_area_definitions`array[]

The allowed template part area values.

 * `...$0` array
 *  Data for the template part area.
    - `area` string
    - Template part area name.
    - `label` string
    - Template part area label.
    - `description` string
    - Template part area description.
    - `icon` string
    - Template part area icon.
    - `area_tag` string
    - Template part area tag.

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

    ```php
    return apply_filters( 'default_wp_template_part_areas', $default_area_definitions );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/block-template-utils.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/block-template-utils.php#L132)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/block-template-utils.php#L132-L132)

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

| Used by | Description | 
| [get_allowed_block_template_part_areas()](https://developer.wordpress.org/reference/functions/get_allowed_block_template_part_areas/)`wp-includes/block-template-utils.php` |

Returns a filtered list of allowed area values for template parts.

  |

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

| Version | Description | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/?output_format=md#comment-content-6756)
 2.   [Marcio Duarte](https://profiles.wordpress.org/pagelab/)  [  3 years ago  ](https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/#comment-6756)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdefault_wp_template_part_areas%2F%23comment-6756)
    Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdefault_wp_template_part_areas%2F%23comment-6756)
 4. How to register a sidebar template part using this hook:
 5.     ```php
        add_filter( 'default_wp_template_part_areas', 'wpdocs_template_part_areas' );
    
        function wpdocs_template_part_areas( array $areas ) {
            $areas[] = array(
                'area'        => 'sidebar',
                'area_tag'    => 'section', // Valid elements: div, header, main, section, article, aside and footer.
                'label'       => __( 'Sidebar', 'mytheme' ),
                'description' => __( 'Template part area description', 'mytheme' ),
                'icon'        => 'sidebar' // Default icons: header, footer and sidebar.
            );
    
            return $areas;
        }
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdefault_wp_template_part_areas%2F%3Freplytocom%3D6756%23feedback-editor-6756)

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