Trying to simulate the issue, it happened the same (wp-admin/submenu_slug
), and the solution is to add a priority value in the hook admin_menu
.
Here, I’m adding a sub menu to the plugin BackWPup. Note the priority 11
:
add_action('admin_menu', 'third_party_submenu_wpse_91377', 11 );
function third_party_submenu_wpse_91377()
{
add_submenu_page(
'backwpup', // Third party plugin Slug
'My plugin',
'My plugin',
'delete_plugins',
'third_party_submenu',
'plugin_options_wpse_wpse_91377'
);
}
function plugin_options_wpse_wpse_91377()
{
echo '<h1>OK</h1>';
}