0
我有以下循環,這是假設拉動所有分類稱爲系列和它下面的帖子。它工作正常,但問題是它不是顯示舊帖子鏈接。我手動轉到第二頁更新的帖子鏈接顯示出來。任何想法我錯過了什麼?WordPress的分類學循環分頁 - 較舊的文章鏈接不顯示
<?php
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$per_page = 5;
$offset = ($page-1) * $per_page;
$args = array('number' => $per_page, 'offset' => $offset, 'hide_empty' => 0,'paged' => $page);
$terms = get_terms('series',$args);
foreach ($terms as $term) {
$wpq = array ('taxonomy'=>'series','term'=>$term->slug);
$myquery = new WP_Query ($wpq);
$article_count = $myquery->post_count;
echo "<h3 class=\"term-heading\" id=\"".$term->slug."\">";
echo $term->name;
echo "</h3>";
if ($article_count) {
echo "<ul>";
while ($myquery->have_posts()) : $myquery->the_post();
echo "<li><a href=\"".get_permalink()."\">".$post->post_title."</a></li>";
endwhile;
echo "</ul>";
} } ?>
<div class="clear"></div>
<p class="previous"><?php next_posts_link(__('← Older posts', 'ari')); ?></p>
<p class="next"><?php previous_posts_link(__('Newer posts →', 'ari')); ?></p>
</div>
我刪除了偏移量,仍然沒有顯示舊的後期鏈接。 – Wolverine