• Resolved 8rittany

    (@8rittany)


    Okay so I’ve created a different sidebar (from blog posts) for my Pages and want it to list all pages under a specific Parent Page. The code to use (I think) is:

    <?php get_page_children( $page_id, $pages ) ?>

    So the question: How do I specify the Parent page_id in a sidebar separate from the actual page?

Viewing 1 replies (of 1 total)
  • Something like:

    <?php
    if ( is_page() ) {
      $page = get_query_var('page_id');
      $children = wp_list_pages('title_li=&amp;child_of='.$page.'&amp;echo=0');
      if ($children) { ?>
        <ul>
        <?php echo $children; ?>
        </ul>
        <?php
      }
    }
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Alternate Sidebar to Link Page Children’ is closed to new replies.