Problem with menu level 3
-
Hi Guys,
Im having some trouble with this piece of code that I use to display my submenu.
I got it displaying the sub sub menues but when I click one of them all the menues from the previus level is gone on the following page so that it only displays the same level menues.
Heres an example to its easier to understand:
BOLD is current page
This is my menu items:
Sub menu item 1
Sub menu item 2
Sub menu item 3I then click “Sub menu item 2” and the menu will look like this:
Sub menu item 1
Sub menu item 2
Sub Sub menu item 1
Sub Sub menu item 2
Sub Sub menu item 3
Sub menu item 3I then click the Sub Sub menu item 2 and the menu will look like this:
Sub Sub menu item 1
Sub Sub menu item 2
Sub Sub menu item 3I want it to still look like this:
Sub menu item 1
Sub menu item 2
Sub Sub menu item 1
Sub Sub menu item 2
Sub Sub menu item 3
Sub menu item 3I really hope it makes sense and you can help me its driving me nuts.
The code i use looks like this:
<div class="submenu"> <?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?> </div>
- The topic ‘Problem with menu level 3’ is closed to new replies.