Another PArent Child Navigation Question
-
I hope I can explain this in a way that makes sense to all.
I have 5 links down the side of my site like so:
Link 1
Link 2
Link 3
Link 4
Link 5Under “Link 2” I have 3 Child Links
Link 1
Link 2
Child 1
Child 2
Child 3
Link 3
Link 4
Link 5What I am after is I want only the Parent Links displayed as default. When a Parent Link is selected that has children I want the Children to show up…but the Parents links to remain there as well.
I have this code currently and the Parents disappear when a Child is selected and I can;t figure out how to fix this.
<?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 id=”navigation”>
<?php echo $children; ?><?php } ?>
Any help is much appreciated.
The topic ‘Another PArent Child Navigation Question’ is closed to new replies.