I have created a plugin and now i want to add a third party plugin inside of the Main Plugin menu, so it can be submenu. How do you make the second plugin appear?
Directory Setup:
/wp-content/plugins/main/
/wp-content/plugins/main/My_builder <----Second Plugin
What i have:
function Main_admin_exist() {
add_menu_page('Main', 'Main', 'manage_options', 'main', 'Main_Dashboard', plugins_url( 'Main/images/icon.png' ));
} add_action('admin_menu', 'Main_admin_exist');
/*Add Sub Menu or Third Parties Plugin to Main*/
function mainThirdPartyPlugin(){
add_submenu_page('main', 'SecondPlugin', 'My Builder', 'manage_options' , 'SecondPlugin', 'SecondPlugin');
}add_action('admin_menu', 'mainThirdPartyPlugin');
Main
:Main
andMy Builder
. What result are you expecting?