我建议在数组中添加类别的arg。不要使用query_posts
.而且showposts
不推荐使用posts_per_page
相反
$args = array (
\'cat\' => array(2,6,9,13),
\'posts_per_page\' => -1, //showposts is deprecated
\'orderby\' => \'date\' //You can specify more filters to get the data
);
$cat_posts = new WP_query($args);
if ($cat_posts->have_posts()) : while ($cat_posts->have_posts()) : $cat_posts->the_post();
get_template_part( \'content\', \'page\' );
endwhile; endif;