您可以使用number参数限制所需的页数,并在foreach循环中获取自定义字段:)(的子项=父页或当前页)
$mypages = get_pages( array( \'child_of\' => $post->ID, \'sort_column\' => \'post_date\', \'sort_order\' => \'desc\', \'number\' => 3, ) );
foreach( $mypages as $page ) {
$content = $page->post_content;
$content = apply_filters( \'the_content\', $content );
?>
<h2><a href="<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a></h2>
<div class="entry"><?php echo $content; ?></div>
<?php
}
http://codex.wordpress.org/Function_Reference/get_pages