Print This Post

WordPress Hints

 

Menu poisitions in wordpress admin menu

  • 2 Dashboard
  • 4 Separator
  • 5 Posts
  • 10 Media
  • 15 Links
  • 20 Pages
  • 25 Comments
  • 59 Separator
  • 60 Appearance
  • 65 Plugins
  • 70 Users
  • 75 Tools
  • 80 Settings
  • 99 Separator

You can use real number for you entry, so if you use 20.042, your menu eppears below Page menu

Admin menu with different name for first submenu

If you create a admin top level menu, you always have a submenu with the same title.
To avoid this, use the top menu slug as the sub menu menu slug.
It only works with a minimum of 2 submenu entries.

Example:


add_menu_page('My Page Title', 'My Menu Title', 'manage_options', 'my-menu', 'my_menu_output' );
add_submenu_page('my-menu', 'Submenu Page Title', 'Whatever You Want', 'manage_options', 'my-menu' );
add_submenu_page('my-menu', 'Submenu Page Title2', 'Whatever You Want2', 'manage_options', 'my-menu2' );

Kommentare

Keine Kommentare bisher

Hinterlassen Sie einen Kommentar