您希望posts\\u per\\u页面,但您必须创建2个查询才能拉入每个标记中的4个,因为默认代码将从任一标记中拉入帖子,而不是从它们之间拉入相等数量的帖子。
$args = array(
\'post_type\' => \'customer-stories\',
\'tag\' => \'microsoft\',
\'posts_per_page\' = \'4\'
);
$args2 = array(
\'post_type\' => \'customer-stories\',
\'tag\' => \'microsoft\',
\'posts_per_page\' = \'4\'
);
$query1 = new WP_Query( $args );
// The Loop
while ( $query1->have_posts() ) {
$query1->the_post();
echo \'<li>\' . get_the_title() . \'</li>\';
}
wp_reset_postdata();
$query2 = new WP_Query( $args2 );
while ( $query2->have_posts() ) {
$query2->the_post();
echo \'<li>\' . get_the_title( $query2->post->ID ) . \'</li>\';
}
这应该能让你找到解决方案