親ページで子ページすべてを取得する。
// 必要なオブジェクトを用意する
$my_wp_query = new WP_Query();
$all_wp_pages = $my_wp_query->query( array(
'post_type' => 'page',
'nopaging' => 'true',
'orderby' => 'ID',
'order' => 'ASC'
) );
$pages = get_page_children( get_the_ID(), $all_wp_pages );
get_page_childrenを使用することで、親の配下にある子ページのデータを取ってくる。