add_menu_page always add an extra subpage
-
Hi,
I’m trying to build a plugin for a client and need to add a separate section to the admin menus.
I use add_menu_page & add_submenu_page to create the section, like so:
add_menu_page('Section', 'Section', 10, __FILE__, 'section'); add_submenu_page(__FILE__, 'Edit', 'Edit', 10, 'section-edit', 'section_edit');
This does add a new section, but it always creates an extra submenu page with the same details as the parent menu page. So it looks like this:
Section
Section
EditI don’t understand why the Section submenu is automatically added – it’s not in line with the rest of the admin section – how can I prevent that?
Thanks
Ben
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘add_menu_page always add an extra subpage’ is closed to new replies.