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 Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
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 Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

 

Photo: Web Navigation Menu Element from BigStock

Tags

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:

    post_parent)
    $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!!

    Thanks!!

Participate