I added theme options page (titled MyTheme) using add_menu_page function, then submenu with add_submenu_page (titled Documentation) and it all works fine. However, when I look at this new menu i created, i see this:
MyTheme (title of admin menu)
– MyTheme (appearing again, with same link, although it wasn’t added)
– Documentation (submenu item I added)
Is there a way to change text for ‘MyTheme’ submenu item so it’s not the same as the one above it?
Absolutely. The longest and most extensive tutorial I’ve seen in a long time 🙂
The reason I went with add_menu_page was because I wanted to have another submenu page (along with the one where options panel would be) that would have theme documentation in it, or links to various documentation pages on my server.
But now that you (and Chip) suggested, it might make more sense not to add a top level page, documentation in a tab inside the page created using add_theme_page will be enough.
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Duplicate menu item with add_menu_page and add_submenu_page’ is closed to new replies.