When I created the navigation menu at the top of my site using the menu feature in WordPress (Appearance → Menus), I didn’t want to have to maintain anything but the top-level menu items. When I released a new plugin and created a page for it, I didn’t want to have to go into my menu UI and add it there too. So instead I wrote this plugin.
Add Descendants As Submenu Items adds a checkbox to each menu item that is of a hierarchical post type (i.e. pages) or taxonomy (i.e. categories). Checking this box will automatically display all descendants as submenu items on the front end of your site. You can see it in action at the top of my site — I only configured the top level menu items and everything that shows up when you hover over them has been added by my plugin rather than manually by me.
Download:
- Download from WordPress.org (1,422 downloads)
Screenshots:
- An example menu and the checkbox this plugin adds
- These submenu items have been added by the plugin


[...] Add Descendants As Submenu Items [...]
[...] Add Descendants As Submenu Items adds a checkbox to each menu item that is of a hierarchical post type (i.e. pages). Checking this box will automatically display all descendants as submenu items on the front end of your site. [...]
Just what I’ve been waiting for; it never made sense to me that this wasn’t standard. Thanks
Got the plugin installed and running; works great, but it would be nice if it worked with categories also.
Oh right, categories can be hierarchical. Good thinking — I’ll get right on it.
Love the update, thanks again.
[...] Add Descendants As Submenu Items adds a checkbox to each menu item that is of a hierarchical post type (i.e. pages). Checking this box will automatically display all descendants as submenu items on the front end of your site. [...]
[...] Add Descendants As Submenu Items ???????????????????????? [...]
[...] Add Descendants As Submenu Items???????????????????????? [...]
[...] Add Descendants As Submenu Items [...]
I have a feature request in trac for this, but since you’ve got a plugin, I closed it. Thanks!
No reason to close the Trac ticket — it might be something useful for core.
Hey Alex,
Works like a CHAMP! Nice Plugin and saves a LOT of time!
This is exactly what I’ve been wishing for! Thanks for saving me so much time on new projects!
[...] Add Descendants As Submenu Items???????????????????????? [...]
Great plugin. Would it be possible to automatically add pages based on their categories though?
So when you create a page/post with a category it gets added to that category of the menu?
I’ve posted this on the plugin page on wordpress.org as well.
this is exactly what I want but it is not working! I have already made a menu (painstakingly taking forever!) but I still have tons and tons of categories to add and arrange hierarchy….any idea why it is not working for me?
Never Mind….It turns out your plugin is exactly what I have been looking for, if only I had found it 2 hours earlier!!!
I was in plugin trial mode, and tried this plugin that I thought was going to generate tags based on my categories…but instead it erased my categories and made them tags, when I reversed it the categories did not retain their parent/child relationship, so now I have to go back and redo the parent child relationship for 300 categories….fdsjklsdfjklsdfjkl!!!!!!!!1
Love it! Using it on a large site I am converting from Joomla to WP. This simple plugin, along with the Widget Logic plugin, allow me to do everything the Joomla CMS did and more, as far as menu management, and gets around some severe menu size limitations in WP custom menus (supposed to be fixed in WP 3.3).
Suggestion:
With so many using All-in-One SEO pack, it would be nice to have an option on each menu item to specify “Use All-in-One Menu Tags” (if AIO is installed and activated), which would get the AIO menu label and title attributes for the top level post and its child items, and use those in the generated menu items.
I have never once used All-in-One SEO Pack and don’t really have any plans to add support for it at this time. I think the plugin is highly overrated and not needed. But that’s a discussion for another day…
Anyway, my plugin hooks in and adds the dynamic menu items so that they appear to WordPress that they’ve been there the entire time. If All-in-One SEO Pack wants to hook into the menu and add stuff to it, then it shouldn’t have any problems adding stuff to the menu items that my plugin adds either because they should all be the same in the eyes of All-in-One SEO Pack. I’m adding real menu items rather than just some HTML.
can i change the size of the submenus?
What size are you referring to? How it looks it controlled by your theme though.
Hi, I cannot get this plugin to work. I have installed the plugin, activated it, checked the checkbox (screen shot here: http://www.alexanderb.org/screenshot1.jpg )
I have created as you can see by the screenshot, a secondary menu which is what I want to be updated. I also have some php code on the page template to determine which menu to show using:
<?php wp_nav_menu( array('fallback_cb' => '', 'container' => 'none', 'container_class' => 'container_class_name_here', 'theme_location' => 'menu-location-name-here', 'menu' => get_post_meta( $post->ID, 'MenuName', true) ) ); ?>But I guess thats all on the page side, not where this plugin is getting its information from?
I of course have the correct parent attributes set on each page.
I am using wordpress 3.2.1
Any help would be greatly appreciated!
Thanks!
Just to clear this up, it does work, it just doesn’t show up in the Appearance > Menus panel… I was expecting it to show all the pages within the editabel list rather than simply ticking the plugin checkbox and trusting that it works! Doh! Great plugin!!
Yeah, it only takes effect on the front end otherwise it wouldn’t work. They’d all load in, you’d hit save, and then you’d lose the purpose of this plugin because they’d all be hard-coded rather than being loaded dynamically.
Thanks, this plugin is great. Only question is, how can I make sure the submenu is displayed vertically in stead of horizontally under the menu?
It’s all dependent on your theme’s CSS.