Support » Plugins and Hacks » Hacks » Display same menu for parent and all its children

  • Resolved tstrebeck

    (@tstrebeck)


    I posted this yesterday, but I think this is a better way of wording what I’m wanting to accomplish…

    I have three main directories in my site, and I’m wanting to display one unique menu for each directory and display it on each child of that directory. I’m thinking I create my three custom menus, but then what would be the best way to display the correct one for each section?

    Thanks for your help!

Viewing 1 replies (of 1 total)
  • Not sure if I get you, but something akin to this?

    if (is_page('your_page_name')){
    wp_nav_menu(array('menu' => 'your_menu_name',
    'container' => false,
    'items_wrap' => '<ul id="%1$s" class="%2$s"><h4>Menu Name</h4>%3$s</ul>'));}
    
    else if{arguments for another menu}
    else if{arguments for another menu}
    else{what to do otherwise}
Viewing 1 replies (of 1 total)
  • The topic ‘Display same menu for parent and all its children’ is closed to new replies.