尝试以下代码:它将显示第二和第三个最新帖子。
$the_query = new WP_Query(array( \'post_type\' => \'post\',
\'post_status\' => \'publish\',
\'order\' => \'DESC\',
\'posts_per_page\' =>\'2\',
\'offset\' => 1
));
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) : $the_query->the_post();
the_title();
the_excerpt();
endwhile;
wp_reset_postdata();
else :
__(\'No post found\');
endif;