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 beta 4.0
The documentation doesn’t explicitly call this out, but to include the page title you must use
'options.php'
as the$parent_slug
.Please try ‘options.php’ instead of NULL for $parent_slug argument.