0

Adding sub menus is easy with add_submenu_page and is working fine as long if you define a $parent_slug:

add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );

if you set the $parent_slug to NULL as described here to hide it from any menu item the title of the page will get ignored ($page_title)

add_submenu_page( NULL, $page_title, $menu_title, $capability, $menu_slug, $function );

I've tested it with all versions from 3.3 up to the latest 4.0

  • ... Drumroll... And your question is?.... :-) – Pieter Goosen Sep 10 '14 at 11:54
  • Sorry, I've updated the headline – Xaver Sep 10 '14 at 12:59
  • Your question should be in the body, not in the title :-) – Pieter Goosen Sep 10 '14 at 13:18
  • 1
    that is still not a question with a meaningful answer. the answer is "because whoever wrote the code thought it should be done that way" – Mark Kaplun Sep 10 '14 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.