0
我有WordPress的网站,只显示在主页上的一个循环。单循环给出一个帖子重复
今天我注意到,循环返回一个特定的职位的副本。
我检查了数据库,并且在数据库中只有一个物理存在。
我这是怎么定义的循环参数:
$args = array(
'posts_per_page' => 65,
'ignore_sticky_posts' => 1,
'paged' => $paged,
'orderby' => 'date',
'order' => 'DESC',
'post_type'=>'post'
);
query_posts($args);
如果我把ID而不是排序依据子句中的“日期”,这个问题不存在。 但我需要它按日期排序。
任何想法为什么会发生这种情况?我知道这通常发生在我们有两个或多个循环时。
谢谢!
对不起,那是循环的只是呼叫。循环是非常基本的: if($ allposts-> have_posts()):while($ allposts-> have_posts()):$ allposts-> the_post(); the_title(); the_title(); endwhile; endif; – 2013-03-14 14:22:35