WordPress.org

Ready to get started?Download WordPress

Ideas

Embed Menus Within Menus

  1. Red Pixel Studios
    Member

    12345

    For larger websites, navigation menus can often become so large that it is difficult to work with them in the Appearance > Menus editor.

    In the menu editor, you have several different choices for items that you can insert into the menu. For example, you can insert "custom links", "pages", "categories", etc (pages being the most common). I propose that there be a new option to allow you to insert a reference to another menu. For example, if I create 2 menus: Menu A and Menu B, it would be nice if you could insert a reference to Menu B from anywhere inside Menu A.

    As wp_nav_menu() loops through each item in the menu to compile an unordered list to return, it should check if the item is a menu reference, and if so it should make a recursive call to itself to return the referenced menu in that location.

    If you have any questions or need further explanation, feel free to ask. Thanks!

    Posted: 2 years ago #
  2. rsteer
    Member

    12345

    I've wished it were possible to build up menus in a *modular* fashion, and it seems like this proposal would probably allow that. A modular approach would be particularly helpful when constructing "mega-menus" -- each block or chunk in the mega-menu could be a building-block menu that might appear in a couple of different contexts. Define it once, then re-use it in any custom menu where it's appropriate.

    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    17 Votes
  • Status

    This idea is under consideration