Assistance required with childs in nav menu
-
Hi
I am trying to create an horizontal navigation menu for my blog.
I.e. Main nav menu for top level pages, a sub menu that only appears when a selected top level page has child pages.
Using the code below I have acheived it to some point, but what I need is when a child page is selected, that the menu still shows the other child pages relating to the top level. At present when a child page is selected the sub menu disappears and just shows the top level page links.
Any assistance offered would be most apreciated.<!-- Top Menu Container Begin--> <div id="headmenucontainer"> <div class="inner"> <div id="menu"> <ul id="nav"> <li><a href="<?php echo get_settings('home'); ?>">Home</a></li> <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1')?> </ul> </div><!-- menu --> </div></div><!-- headmenu-container end--> <?php if (wp_list_pages('&child_of='.$post->ID.'&echo=0')) { ?> <div id="submenucontainer"> <div class="inner"> <div id="submenu"> <ul id="nav"> <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID.'')?> </ul> </div><!-- submenu --> </div> <?php } ?> </div><!-- submenu-container end--> <!-- Top Menu Container End-->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Assistance required with childs in nav menu’ is closed to new replies.