Get all pages under a parent page.
<?php
query_posts(array(
'post_parent' => $post->ID,
'post_type' => 'page',
'posts_per_page' => -1,
));
if (have_posts()) {
echo '<ul>';
while (have_posts()) {
the_post();
printf(
'<li><a href="%s">%s</a></li>',
esc_url(get_permalink()),
esc_html(get_the_title())
);
}
echo '</ul>';
wp_reset_query();
}
?>
template.php