Hi,
On my site: here
I would like the subnavigation only to show when a user clicks on the parent that has children, I alo want to show the parent title
at the moment, my left mavigation shows eveything and when I click on the sub navigation (child) the parent link disapears?!
<?php
global $wp_query;
if( empty($wp_query->post->post_parent) ) {
$parent = $wp_query->post->ID;
} else {
$parent = $wp_query->post->post_parent;
} ?>
<?php if(wp_list_pages("title_li=&child_of=$parent&echo=0&depth=1" )): ?>
<div id="submenu">
<h2><?php
$parent_title = get_the_title($post->post_parent);
echo $parent_title;
?></h2>
<ul>
<?php wp_list_pages("title_li=&child_of=$parent" ); ?>
</ul>
</div>
<?php endif; ?>