Return to Snippet

Revision: 40141
at January 26, 2011 21:52 by raz

Initial Code
  $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  if ($children) { ?>
  <?php echo $children; ?>
  <?php } ?>

Initial URL

Initial Description
his code will show the child pages, and only the child pages, when on a parent or on one of the children.
This code will not work if placed after a widget block in the sidebar.

Initial Title
List WordPress subpages even if on a subpage

Initial Tags
list, wordpress

Initial Language