Hi,
I am trying to create a subnavigation in the sidebar of my site.
I have used this code below to pull the children of the parent page of the section.
I want to also be able to pull the title of the parent page of the section and link it to its page and add to subnav.
How would i do that? I know it has to be somewhat easy to do, just not sure the syntax.
thanks for any help!
a
<?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) { ?>
<a href=""><?php the_title(); ?></a>
<ul id="subnav">
<?php echo $children; ?>
</ul>
<?php } ?>