您需要创建一个页面模板并直接查询这些页面。
$args = array(
\'post_type\' => \'page\',
\'post__in\' => array(430,436,433), //The Page IDs you want to query
\'order\' => \'ASC\'
);
$page_query = new WP_Query($args);
如果要自动执行此操作并获取当前页面的子页面,可以使用以下内容:
<?php
// Set up the arguments for retrieving the pages
$args = array(
\'post_type\' => \'page\',
\'numberposts\' => -1,
// $post->ID gets the ID of the current page
\'post_parent\' => $post->ID,
\'order\' => ASC,
\'orderby\' => title
);
$subpages = get_posts($args);
// Just another WordPress Loop
foreach($subpages as $post) :
setup_postdata($post);
?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endforeach; ?>