0
我正在使用underscores_me作爲主題首發。我想在我的頭版中顯示最近的3篇文章。但不是作爲一個側欄,而是作爲我的主要內容。隨着200文本作爲摘錄,按日期和降序排序。WordPress的顯示重複最近的帖子
我一直在閱讀所有的網絡,我一直在應用我可以找到的所有解決方案,但它們都提供了3個最近的帖子,但它被重複了10次。
<ul>
<?php
$Poz = array(
'orderby' => 'date',
'order' => 'DESC',
'no_found_rows' => true,
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'post__not_in' => $do_not_duplicate,
'posts_per_page' => 3,
);
query_posts($Poz);
while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?> yazısını oku."><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query();
?>
請幫我
感謝您的回覆。我在編輯content.php。然後我注意到index.php中也有一個循環。這就是它重複的原因。謝謝,現在我得到了解決方案。 – user3670188