Categories

WP Function – add_menu_page

You are here:
< All Topics

The add_menu_page WordPress function has the following variables that you can use:

  • Param 1: Name of plugin
  • Param 2: The name you want displayed in the menu
  • Param 3: ‘managed_options’ means only admins can access and see this link.
  • Param 4: The slug of the page. This will display in the url when you click on the page.
  • Param 5: This is an array… this is a name of a function ‘admin_index’ that will be called. In that function will be the template file that is the admin dashboard page.
  • Param 6: This is the dashicon image you want to use for the icon next to the Menu Title.
  • Param 7: The position you want your menu link to be. the bigger the number the more it sinks to the bottom of the list.
Table of Contents
Scroll to Top