0
我的自定義帖子頁面的分頁工作正常,但添加幾個帖子後它壞了 - 舊的帖子鏈接不再工作。WordPress破碎分頁
請問我該如何解決?我曾嘗試禁用插件,更改永久鏈接以及幾乎所有我可以在WordPress Codex上輕鬆找到的內容。
這裏是我的查詢與分頁:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array('post_type' => 'press' , 'posts_per_page' => 50 , 'paged' => $paged);
query_posts($args);
/*Setting up our custom query (In here we are setting it to show 12 posts per page and eliminate all sticky posts) */
//query_posts ($args);//query_posts($query_string . '&caller_get_posts=6&posts_per_page=12');
?>
<ul class="griditemleft clear">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php if (has_post_thumbnail()) : ?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
<h2 class="press-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
</li>
<?php endif; ?>
<?php endwhile; ?>
</ul>
<div class="nav-previous alignleft"><?php next_posts_link('Older posts'); ?></div>
<div class="nav-next alignright"><?php previous_posts_link('Newer posts'); ?></div>
<?php else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>