i have links in my sidebar, and right now, they contain the current parent page, and the child pages of the current parent page.
Is there a way i can HIDE the parent page link when ON the parent page, (yet still showing child pages) and then show it again when ON a child page? Have not been able to find the answer anywhere.
The site is currently at http://fitzfi.com/wordpress/
my code currently looks like this:
<?php
$parent_title = get_the_title($post->post_parent);?>
<a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent_title;?></a>
<ul class="children">
<?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");
if ($children) {
?>
<ul>
<?php echo $children; ?>
</ul>
<?php } ?>
or see it here: http://drp.ly/Ue6ab