Plugin Menus and submenus
-
Hi
I’m writing a plugin that requires a few subpages.
I have my initial defined like this:add_action('admin_menu', 'acme_menu'); function acme_menu() { add_menu_page('Acme', 'Acme', 'manage_options', 'acme', 'acme_events'); }
This works fine and I display the content with acme_events.
Now I’m trying to create a sub-menu like this
function acme_sub_menu() { add_submenu_page('acme', 'Import Acme Event', 'Import Acme Event', 'manage_options', 'import-event', 'import_event'); }
The menu appears, but the slug is wrong – it shows ‘wp-admin/import-event’ instead of ‘?page=import-event’ – clicking it gives me a frontend 404.
What am I doing wrong?
I hope someone can help me as I have not had much luck with these forums. I’ve posted numerous equally urgent questions that remain
unanswered. Are there any OTHER wordpress forums?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Plugin Menus and submenus’ is closed to new replies.