Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I guess this question is more or less about aesthetics and organization rather than functionality, but I'm curious nonetheless...

I know I can add a custom menu item in the dashboard for my plugin using the add_menu_page() function, but my question is: Is it possible to add a "master" menu item with "sub-menu" items which would correlate to individual plugin options pages?

In other words, let's say my company name is "Guru Guy" and I have released 4 different plugins... Would it be possible to create a menu item that looked something like this:

Guru Guy <-- Main menu item

-- Plugin 1 <-- Plugin 1's options page link

-- Plugin 2 <-- Plugin 2's options page link

-- Plugin 3 <-- Plugin 3's options page link

-- Plugin 4 <-- Plugin 4's options page link

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Yes,

http://codex.wordpress.org/Administration_Menus

Specific to your question add_submenu_page: http://codex.wordpress.org/Function_Reference/add_submenu_page

share|improve this answer
    
I guess I'm not explaining it thoroughly enough. I understand how to create a submenu item, but my question is if it's possible to have each submenu item under a single parent menu item be related to completely different plugins... Rather than several submenu items related to the same plugin and it's options. –  Nero_DCLXVI Oct 22 '11 at 23:19
1  
Yes the function parameter allows it to be anything you want, its basically just a blank page. –  Wyck Oct 22 '11 at 23:28
    
I see, so it seems then that the most difficult part would be checking to see if the parent menu already exists upon plugin activation, as well as checking for the installation of the other plugins which would be listed as submenu items. –  Nero_DCLXVI Oct 22 '11 at 23:36
    
yes exactly , for example using is_plugin_active but this is more a question on how you structure your system. –  Wyck Oct 23 '11 at 0:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.