Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/add management page


Add sub menu page to the Tools main menu.

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


$page_title$menu_title$capability$menu_slug$function );


(string) (required) The text to be displayed in the title tags of the page when the menu is selected.
Default: None
(string) (required) The text to be used for the menu
Default: None
(string) (required) The capability required for this menu to be displayed to the user. User levels are deprecated and should not be used here!
Default: None
(string) (required) The slug name to refer to this menu by (should be unique for this menu).
Default: None
(callback) (optional) The function to be called to output the content for this page.
Default: Empty string

Return Values

The resulting page's hook_suffix, or false if the user does not have the $capability required.


add_management_page( 'Custom Permalinks', 'Custom Permalinks', 'manage_options', 'my-unique-identifier', 'custom_permalinks_options_page' );


Source Files

add_management_page() is located in wp-admin/includes/plugin.php.


Administration Menus: add_menu_page(), remove_menu_page(), add_submenu_page(), remove_submenu_page(), add_dashboard_page(), add_posts_page(), add_media_page(), add_links_page(), add_pages_page(), add_comments_page(), add_theme_page(), add_plugins_page(), add_users_page(), add_management_page(), add_options_page()

See also index of Function Reference and index of Template Tags.