I am certain this has been done before but I am having trouble finding the solution. Please paste any links to helpful documentation or other forum posts on this topic.
What I want is for each of my main navigation pages to list all subpages beneath (depth=0), but when visiting a subpage I would still like for the grandparent and parent pages to remain in the list. Currently I am using the code from the wp list pages documentation:
<?php
if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&sort_column=menu_order");
else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&sort_column=menu_order");
if ($children) { ?>
<?php echo $children; ?>
<?php } ?>
The problem with this is that when you visit a subpage the parent pages disappear. See http://www.toledomuseum.org/wordpress/be-involved
to see what I am talking about when you select a subpage.
I know this is basic. I have searched high and low. If you have any wisdom on the topic it would be greatly appreciated. Thanks.