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

Function Reference/menu page url


Get the url to access a particular menu page based on the slug it was registered with.

If the slug hasn't been registered properly no url will be returned


<?php menu_page_url$menu_slug$echo ); ?>


(string) (required) The slug name to refer to this menu by (should be unique for this menu)
Default: None
(boolean) (optional) Whether or not to echo the url - default is true
Default: 1

Return Values

the url

Change Log

Since: 3.0

Source File

menu_page_url() 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.