WordPress.org

Ready to get started?Download WordPress

Forums

Automatically populate custom menu items with subpages (10 posts)

  1. logangreer
    Member
    Posted 3 years ago #

    I would like to create a custom menu (in this instance it's for the excellent Twenty Ten theme) in which I can check a box that allows a menu item's child pages to automatically be added to the menu.

    Child pages are already automatically added in the main menu when it's not a custom menu.

    For example: when I create a custom menu and add pages to it, in the menu item options for each page, I think there should be a checkbox that simply says "Automatically add subpages of this item to the menu."

    This seems like an obvious functionality to me. I wonder why it's not already there.

  2. Peter Anselmo
    Member
    Posted 3 years ago #

    AGREED! I would love a way to have a custom menu to duplicate the entire heirarchy and not just top level pages. I went through the trouble of specifying a parent page when I created it, I need to not only enter it by hand into the menu, I also have to re-position it.

    It's a pain to use custom menus on anything but a tiny site.

    Anyone know of anything?

  3. mrmist
    Forum Janitor
    Posted 3 years ago #

  4. Bill Addison
    Member
    Posted 3 years ago #

    Plus 1 on this feature.

    I heard there's a way to manually write your own custom "wp_nav_menu" function to facilitate this but seems complicated.

    One other feature I'd like to add here is to automatically set the title attribute for all links as it's content unless otherwise specified.

  5. jessejd
    Member
    Posted 3 years ago #

    Here is a plug-in I just published. It replaces the core auto-add function with one that automatically populates sub-menus. It also adds a much needed function of removing menu items when pages are no-longer marked as published.

  6. jessejd
    Member
    Posted 3 years ago #

  7. elody
    Member
    Posted 3 years ago #

    Hello jessejd, your plugin has installed and activated with no problem ... but when I check the 'Automatically add new top-level pages' checkbox, and save the menu, it doesn't add the subpages attached to my top level page.
    Am I missing something ?
    THX for help :)

  8. mikeyhelikesit
    Member
    Posted 3 years ago #

    yea, doesn't work for me either. It just adds it as a top level page. Hmmm..

    any luck with this plugin for anyone else?

  9. inpixelitrust
    Member
    Posted 3 years ago #

    Hi, the Enhanced Custom Menu plug-in seams broken, but the "gecka sub menu" plugin should do the trick. You will just have to create your menu with the 1st level items, save it, and you'll get a checkbox "Autopopulating with child pages " for each of you're menu items :)

  10. rmk
    Member
    Posted 2 years ago #

    BIG thanks for posting about gecka submenu. Absolutely fantastic, no more manually adding every page to my menu!

Topic Closed

This topic has been closed to new replies.

About this Topic