I am trying to add a submenu page to add extra functionality to a theme. I have used the admin_menu
action hook to attach the submenu page. I am not sure what happens but my submenu is not displaying.
add_action( 'admin_menu', array($this, 'admin_menu_page') );
public function admin_menu_page()
{
add_submenu_page(
'option-general.php',
'My Sub Menu',
'My Sub Menu',
'manage_options',
'submenu-page',
array($this, 'sub_menu_page_callback')
);
}
I am not sure what i have missed. This code should display at least My Sub Menu under Settings menu.