Return to Snippet

Revision: 42423
at March 4, 2011 22:57 by mesh606

Initial Code
<ul><?php $parent_title = get_the_title($post->post_parent);?>
<li><a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent_title;?></a></li></ul>

			if ($post->post_parent)	{
				$parent = $ancestors[$root];
			} else {
				$parent = $post->ID;
			$children = wp_list_pages("title_li=&child_of=". $parent ."&echo=0");
			if ($children) { ?>
			<ul id="subnav">
			<?php echo $children; ?>
			<?php } ?>

Initial URL

Initial Description
use this in the sidebar to show a top level page with child pages persistently

Initial Title
Show Top Level and Child Pages in Wordpress

Initial Tags

Initial Language