0
我有类似这样的代码:the_post()冲突在WordPress脚本
while (have_posts()) : the_post();
.... more code ...
$my_query = new WP_Query($args);
if ($my_query->have_posts()) :
while ($my_query->have_posts()) :
$my_query->the_post();
.... other code ..
的问题是如何避免the_post()
冲突? 因为有了第一个while loop
我正在访问一些posts
和其他帖子。而我的网站从第二时间显示信息,但它应该首先显示帖子的信息。现在我认为这是令人困惑的帖子...
while循环,反正不要在inner while循环中使用the_post()。 –