Php Wordpress循环从第三篇文章开始
我搜索了很多,但没有得到确切的答案,我希望我的Wordpress循环开始从最近发布的第三篇文章中选择两篇文章,按类别排序,如新闻。我怎么做? 我想就像在SQL中一样Php Wordpress循环从第三篇文章开始,php,wordpress,Php,Wordpress,我搜索了很多,但没有得到确切的答案,我希望我的Wordpress循环开始从最近发布的第三篇文章中选择两篇文章,按类别排序,如新闻。我怎么做? 我想就像在SQL中一样 SELECT * FROM tbl ORDER BY date DESC LIMIT 2,2; 您可以尝试以下代码: query_posts('offset=2&posts_per_page=2&cat=<id_of_cat>'); while ( have_posts() ) : the_p
SELECT * FROM tbl ORDER BY date DESC LIMIT 2,2;
您可以尝试以下代码:
query_posts('offset=2&posts_per_page=2&cat=<id_of_cat>');
while ( have_posts() ) : the_post();
endwhile;
希望能有帮助