Php 如何跳过WordPress中的第一篇帖子?
如何跳过WordPress中的第一篇帖子Php 如何跳过WordPress中的第一篇帖子?,php,wordpress,Php,Wordpress,如何跳过WordPress中的第一篇帖子 <?php $recentPosts = new WP_Query(); $recentPosts->query(array('showposts' => 6,'post_type' =>array('stiri'))); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> 使用以下参数: <?
<?php
$recentPosts = new WP_Query();
$recentPosts->query(array('showposts' => 6,'post_type' =>array('stiri')));
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
使用以下参数:
<?php
$recentPosts = new WP_Query( 'offset=1' ) );
$recentPosts->query(array('showposts' => 6,'post_type' =>array('stiri')));
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
这个答案是错误的。设置偏移量将中断分页。