您可以使用下面的查询按id或页面段塞从特定页面获取内容
// WP_Query arguments
$args = array(
\'page_id\' => \'12,14,78,89\',//replace the page ids
//\'pagename\' => \'aboutus, contact\', //or use page slugs
\'post_type\' => array( \'page\' ),
\'post_status\' => array( \'publish\' ),
\'posts_per_page\' => \'10\',
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
echo \'<h3>\';
echo $the_title;
echo \'</h3>\';
echo $the_content;
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();