WordPress plugin: Auto Submenu
automatically adds new child pages to your menus
One of my pet peeves in WordPress is that the menu system only allows you to “Automatically add new top-level pages”, and does not offer the same functionality for new child pages. This limitation isn’t too big a deal for small websites, but if you’re filling in a customer’s website with many subpages, it can be quite tedious to add all of those subpages to your custom menu manually.
In my opinion, the lack of this functionality is quite illogical (I’m not the only one), and I think this functionality certainly deserves to be integrated into the WordPress core. However, this enhancement has been postponed.
There are several plugins out there that try to solve the problem, such as Gecka Submenu and Add Descendants As Submenu Items. However, those plugins do not actually add any subpages to your custom menu, but instead just show the subpages when
wp_nav_menu() is called in your theme. This is fine for some use cases, but in the admin Menus Screen I actually want to be able to rearrange/configure/delete all of my menu items, including the subpages.
The solution: Auto Submenu
To solve the problem, I wrote my own plugin called Auto Submenu, and have publicly released it. The plugin is extremely easy to use:
- Install the plugin.
- Activate the plugin.
- New child pages will now automatically be added to your custom navigation menu.
Download and install Auto Submenu via the WordPress Plugin Directory: https://wordpress.org/plugins/auto-submenu/.
When activated, the plugin will do its magic whenever you publish a new child page. If the new page’s parent is placed in a custom menu, then the new page will be added to that menu too (one level below its parent). Should you wish to reorder or delete the new page from the menu, you can simply do so on the admin Menus Screen.
The plugin does not have any settings. Auto Submenu will just work for all custom menus where the “Automatically add new top-level pages” setting is enabled.