Page Title is missing on Pages with add_submenu_page

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)

Read More
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

Related posts

Leave a Reply

2 comments

  1. The documentation doesn’t explicitly call this out, but to include the page title you must use 'options.php' as the $parent_slug.

    add_submenu_page( 'options.php', $page_title, $menu_title, $capability, $menu_slug, $function );