Hi there Wordpress guru's,
i running up against a problem. I've my parent pages in the header.php and childpages in page.php. when i clicked on one of the subpages in a parent page i want that my parent page stay active. How can i get that done?
in my header.php i've the following code:
<ul id="mainNav">
<?php wp_list_pages('sort_column=menu_order&exclude=2&depth=1&title_li='); ?>
</ul>
page.php
<?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) { ?>
<div id="subPages">
<ul>
<li class="root"><?php echo '<a href="'.get_permalink($post->post_parent).'">'.get_the_title($post->post_parent).'</a>';?></li>
<?php echo $children; ?>
</ul>
</div>
<?php } else { ?>
<?php } ?>
U can see the example : here when you click on one of the subpages i want that the parent page (the tab above) stays active.
tnx for advance.