Automatically Add WordPress Submenu to Parent Menu for Pages

When you create a new Page in WordPress, you can have it automatically create a menu item for you if you like. One thing WordPress doesn’t do, however, is automatically create a submenu for you if you create Child Pages (or Sub-Pages).

The  Auto Submenu plugin will allow you to do this. It will automatically create a submenu for your Parent Pages whenever you create a Child Page, even if you are using custom menus.

This would seem to be especially useful for client sites. Set it up, and then teach clients how to create a Child Page. After that, their menus will automatically be updated for them.


Set Up

Although there are no settings for the plugin, in order to get it to work with Custom Menus (the menus that you set up yourself in the WordPress admin area), you will need to make sure the box is checked to “Automatically add new top-level pages.”

Another important note is that this will only work for Child Pages created AFTER the plugin has been installed and activated.


Set a Parent Page

The easiest way to create a Child Page is to set a Parent Page when creating a new Page.  Do this on the right hand side of your Post Editor screen.


Featured Plugin - WordPress Membership Site Plugin

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more


Sub Menu Automatically Created

And that’s it. The submenu will automatically be created for you and added to your menu system.

And here’s a look at the automatically created submenu in the backend.

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more


Photo: Web Navigation Menu Element from BigStock


Comments (3)

  1. God bless you and thank you, you really are a life safer. This worked great for me with the WordPress codex to creat a nav and submenu.

    – Used WordPress codex for a nav and subnav on page.php for my template:

    $children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″); else
    $children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
    if ($children) { ?>

    I followed the instructions, used my original css that I had for the nav to style it just the same at the static website and it worked great!!