WordPress.org

Support

Support » How-To and Troubleshooting » combine main menu and sub menu help please

combine main menu and sub menu help please

  • Hi I’m sure this query will have been brought up before now but searching only brings up people who want to display side nav sub menus only. My query is differentAnyway here is what I need a quick answer to:

    I have a 3 tier hierarchy navigation in a vertical side bar and only want to display the sub menu when you are on the parent page:

    Lets say you are on the home page and it doesn’t have any children then the nav would be:

    <ul>
    	<li><a href="#">Home</a></li>
    	<li><a href="#">Services</a></li>
    	<li><a href="#">Contact</a></li>
    </ul>

    Now let’s say you are on the Services page which does have children the nav would be:

    <ul>
    	<li><a href="#">Home</a></li>
    	<li><a href="#">Services</a>
                <ul>
                    <li><a href="#">Repairs</a></li>
                    <li><a href="#">Replacements</a></li>
                </ul>
            </li>
    	<li><a href="#">Contact</li>
    </ul>

    And now lets say you are on the repairs page which also has children:

    <ul>
    	<li><a href="#">Home</a></li>
    	<li><a href="#">Services</a>
                <ul>
                    <li><a href="#">Repairs</a>
                           <ul>
                              <li><a href="#">Punctures</a></li>
                              <li><a href="#">Headlights</a></li>
                           </ul>
                    </li>
                    <li><a href="#">Replacements</a></li>
                </ul>
            </li>
    	<li><a href="#">Contact</li>
    </ul>

    Is there any plugin that will easily help me do this?

    Alternatively I’ve tried building a menu in the wordpress menu tab but that displays all pages regardless of where you are on the site, is there any way to hack or specify some argument for it?

    Also in the pages menu I can specify that some pages are sub pages by using the “parent” drop down but again this displays a full nested list on the page.

    I want to only show the nested list when you are on the relevant page.

    Any help is much apreciated.

    Thanks

    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘combine main menu and sub menu help please’ is closed to new replies.