WordPress: how to list a page’s child pages

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

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 by SA.

Leave a Reply

Your email address will not be published. Required fields are marked *