Title: custom_menu_order
Published: December 18, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘custom_menu_order’, bool $custom )

## In this article

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

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

Filters whether to enable custom ordering of the administration menu.

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

See the [‘menu_order’](https://developer.wordpress.org/reference/hooks/menu_order/)
filter for reordering menu items.

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

 `$custom`bool

Whether custom ordering is enabled. Default false.

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

    ```php
    if ( apply_filters( 'custom_menu_order', false ) ) {
    ```

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

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

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

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

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/custom_menu_order/?output_format=md#comment-content-4733)
 2.   [Steven Lin](https://profiles.wordpress.org/stevenlinx/)  [  5 years ago  ](https://developer.wordpress.org/reference/hooks/custom_menu_order/#comment-4733)
 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%2Fcustom_menu_order%2F%23comment-4733)
    Vote results for this note: 0[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%2Fcustom_menu_order%2F%23comment-4733)
 4. Example migrated from Codex:
 5. The following code below groups Dashboard/Posts/Pages/Comments together at the 
    top of the dashboard menu.
 6. If you have a custom post type that you want to add to the group, use the format`
    edit.php?post_type=YOURPOSTTYPENAME`
 7.     ```php
        add_filter( 'custom_menu_order', '__return_true' );
    
        add_filter( 'menu_order', 'my_menu_order' );
    
        function my_menu_order( $menu_order ) {
               return array( 'index.php', 'edit.php', 'edit.php?post_type=page', 'edit-comments.php' );
        }
        ```
    
 8.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustom_menu_order%2F%3Freplytocom%3D4733%23feedback-editor-4733)

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