Add menu page without submenu
-
Hello, I’m programming a plugin and in the code I’va added a page and some submenus, the problem I have is the page appears as a submenu also, I have:
add_menu_page( "Myplugin", "Myplugin", "activate_plugins", "Myplugin", "Myplugin_Entry1"); add_submenu_page( "Myplugin", "Entry1", "Entry1", "activate_plugins", "Myplugin-Entry1", "Myplugin_Entry1" ); add_submenu_page( "Myplugin", "Entry2", "Entry2", "activate_plugins", "Myplugin-Entry2", "Myplugin_Entry2" );
And this does:
Myplugin
– Myplugin
– Entry 1
– Entry 2And I wish to have:
Myplugin
– Entry 1
– Entry 2What do I need to do?
I know I shouldn’t have “Myplugin_Entry1” as last parameter in add_menu_page( “Myplugin”, “Myplugin”, “activate_plugins”, “Myplugin”, “Myplugin_Entry1”); but otherwise I get an error when clicking menu page.
Thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add menu page without submenu’ is closed to new replies.