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
<title>
tag be set regardless of whether the page has a parent or not. Perhaps this is a bug report for WP?