Top-level menu duplicated as submenu in admin section plugin
-
I’ve seen a couple of posts about this, but none of the fixes seem to be working for me. I’m trying to create a menu for a plugin which has two submenus, but the top-level title keeps being duplicated as a submenu.
The following are variations I’ve tried to get this working:
add_menu_page("Manage News", "Manage News", 1, "manage_news_admin", "include_core"); add_submenu_page(basename(__FILE__), 'Edit', 'Edit', 10, basename(__FILE__), 'section_edit');
add_menu_page("Manage News", "Manage News", 1, "manage_news_admin", "include_core"); add_submenu_page(basename(__FILE__), 'Edit', 'Edit', 10, basename(__FILE__), 'section_edit');
add_menu_page("Manage News", "Manage News", 1, "manage_news_admin", "include_core"); add_submenu_page(__FILE__, 'Edit', 'Edit', 10, 'section-edit', 'section_edit');
add_menu_page("Manage News", "Manage News", 1, "manage_news_admin", "include_core"); add_submenu_page('section_edit', 'section_edit', 'section_edit', 10, 'section-edit', 'section_edit');
And the full code for the plugin file is:
function configure_menu(){ add_menu_page("Manage News", "Manage News", 1, "manage_news_admin", "include_core"); [code for removing duplicate goes here]; } function include_core(){ include('aggregator/aggregator_core.php'); } function feed_list_admin() { include('aggregator/feed_management.php'); } function feed_tags_admin() { include('aggregator/feed_tag_management.php'); } function feed_list_actions() { add_submenu_page("manage_news_admin", "Feed List", "Feed List", 1, "aggregator/feed_management.php", "feed_list_admin"); } function feed_tags_actions() { add_submenu_page("manage_news_admin", "Feed Keywords", "Feed Keywords", 1, "aggregator/feed_tag_management.php", "feed_tags_admin"); } add_action('admin_menu', 'configure_menu'); add_action('admin_menu', 'feed_list_actions'); add_action('admin_menu', 'feed_tags_actions');
If anyone has any advice on how to get this working I would really appreciate it, as this is pretty much the only bit left to get working.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Top-level menu duplicated as submenu in admin section plugin’ is closed to new replies.