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

---

# add_dashboard_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $callback, int $position = null ): string|false

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#return)
 * [More Information](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#user-contributed-notes)

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

Adds a submenu page to the Dashboard main menu.

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

This function takes a capability which will be used to determine whether or not 
a page is included in the menu.

The function which is hooked in to handle the output of the page must check that
the user has the required capability as well.

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

 `$page_title`stringrequired

The text to be displayed in the title tags of the page when the menu is selected.

`$menu_title`stringrequired

The text to be used for the menu.

`$capability`stringrequired

The capability required for this menu to be displayed to the user.

`$menu_slug`stringrequired

The slug name to refer to this menu by (should be unique for this menu).

`$callback`callableoptional

The function to be called to output the content for this page.

`$position`intoptional

The position in the menu order this item should appear.

Default:`null`

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

 string|false The resulting page’s hook_suffix, or false if the user does not have
the capability required.

## 󠀁[More Information](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#more-information)󠁿

This function is a simple wrapper for a call to [ add_submenu_page()](https://developer.wordpress.org/reference/functions/add_submenu_page/),
passing the received arguments and specifying 'index.php' as the $parent_slug argument.
This means the new page will be added as a sub-menu to the _Dashboard_ menu.

The $capability parameter is used to determine whether or not the page is included
in the menu based on the [Roles and Capabilities](https://wordpress.org/support/article/roles-and-capabilities/))
of the current user.

The function handling the output of the options page should also verify the user’s
capabilities.

If you’re running into the »You do not have sufficient permissions to access this
page.« message on a `wp_die()` screen, then you’ve hooked too early. The hook you
should use is `admin_menu`.

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

    ```php
    function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null ) {
    	return add_submenu_page( 'index.php', $page_title, $menu_title, $capability, $menu_slug, $callback, $position );
    }
    ```

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

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

| Uses | Description | 
| [add_submenu_page()](https://developer.wordpress.org/reference/functions/add_submenu_page/)`wp-admin/includes/plugin.php` |

Adds a submenu page.

  |

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

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Added the `$position` parameter. | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

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

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/add_dashboard_page/?output_format=md#comment-content-722)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/add_dashboard_page/#comment-722)
 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%2Ffunctions%2Fadd_dashboard_page%2F%23comment-722)
    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%2Ffunctions%2Fadd_dashboard_page%2F%23comment-722)
 4. **Typical usage occurs in a function registered with the ‘admin_menu’ hook:**
 5.     ```php
        /**
         * Add a page to the dashboard menu.
         */
        function wpdocs_plugin_menu() {
        	add_dashboard_page( __( 'WPDocs Plugin Dashboard', 'textdomain' ), __( 'WPDocs Plugin', 'textdomain' ), 'read', 'wpdocs-unique-identifier', 'wpdocs_plugin_function' );
        }
        add_action('admin_menu', 'wpdocs_plugin_menu');
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fadd_dashboard_page%2F%3Freplytocom%3D722%23feedback-editor-722)

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