So far I have a horizontal mainmenu with the parent pages. Each parent has a child. When I click one of the parents the child-items appear beneath the parent.
<ul class="span-24" id="nav">
<?php wp_list_pages('title_li=&depth=1&exclude=18,20'); ?>
</ul>
<?php if($post->post_parent)
$children = wp_list_pages("title_li=&depth=1&child_of=".$post->post_parent."&echo=0"); else
$children = wp_list_pages("title_li=&depth=1&child_of=".$post->ID."&echo=0");
if ($children && is_page()) { ?>
<ul class="span-24" id="subnav">
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>
some of the child-pages have children (grandchild). When I click one of the child-pages I get a list of its children. This is being done in a custom template with this code
<?php
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1");
?>
<div id="sub_sub_menu">
<ul>
<?php echo $children; ?>
</ul>
</div>
My problem is that when a click on a grandchild, its parent disappears. I now only see the parent(depth 0) and the grandchild (depth 2). I need to see all three (parent, child and grandchild)