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:
I 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?