Title: default_hidden_meta_boxes
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘default_hidden_meta_boxes’, string[] $hidden, WP_Screen $screen )

## In this article

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

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

Filters the default list of hidden meta boxes.

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

 `$hidden`string[]

An array of IDs of meta boxes hidden by default.

`$screen`[WP_Screen](https://developer.wordpress.org/reference/classes/wp_screen/)

[WP_Screen](https://developer.wordpress.org/reference/classes/wp_screen/) object
of the current screen.

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

    ```php
    $hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/screen.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/screen.php#L181)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/screen.php#L181-L181)

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

| Used by | Description | 
| [get_hidden_meta_boxes()](https://developer.wordpress.org/reference/functions/get_hidden_meta_boxes/)`wp-admin/includes/screen.php` |

Gets an array of IDs of hidden meta boxes.

  |

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

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

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

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/default_hidden_meta_boxes/?output_format=md#comment-content-1810)
 2.   [Aurovrata Venet](https://profiles.wordpress.org/aurovrata/)  [  10 years ago  ](https://developer.wordpress.org/reference/hooks/default_hidden_meta_boxes/#comment-1810)
 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_hidden_meta_boxes%2F%23comment-1810)
    Vote results for this note: 2[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_hidden_meta_boxes%2F%23comment-1810)
 4. This filter is used to hide metabox by default, an admin user can then select the‘
    Screen Options’ tab in the top right hand corner of the post edit screen and they
    will see the designated ‘hidden’ metaboxes checked in the list of options,
 5.     ```php
        add_filter('default_hidden_meta_boxes','hide_meta_box',10,2);
        function hide_meta_box($hidden, $screen) {
            //make sure we are dealing with the correct screen
            if ( ('post' == $screen->base) && ('my-custom-post_type' == $screen->id) ){
              //lets hide everything
              $hidden = array('postexcerpt','slugdiv','postcustom','trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
              $hidden[] ='my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.
            }
            return $hidden;
          }
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdefault_hidden_meta_boxes%2F%3Freplytocom%3D1810%23feedback-editor-1810)

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