WordPress: how to list a page's child pages

How to list a page's child pages in WordPress?

asked Jan 24, 2013 by anonymous

1 Answer

 
Best answer

wp_list_pages can list the sub pages of a page.

Check this code (also include the HTML that wraps it as an example):

<h3>Pages under <?php the_title(); ?></h3>
<div class="entry">
<ul>
<?php 
    global $id;
    wp_list_pages("title_li=&child_of=$id&show_date=modified
                  &date_format=$date_format");
?>
</ul>
</div>
answered Jan 24, 2013 by SA (14,760 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...