I set up a pagination function for my wordpress blog. When clicking to the next page, the URL is correct: “/page/1”, “/page/2”, “/page/3” etc, but the actual posts don’t change from page to page (page 2 and page 3 still display the first page of posts). Here’s the code I’m using for the loop:
Edit 4/24/10: I removed the ‘offset’ => 1, parameter and the paging now works, but now the question becomes: how do I use the offset parameter and still page?
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$sticky=get_option('sticky_posts');
$args=array(
'offset' => 1,
'category__not_in' => array(-6),
'paged'=>$paged,
'showposts' => 6,
);
query_posts($args);
if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
Any help/insight would be much appreciated. Thank you!
I removed the
'offset' => 1,
parameter and the paging now works, but now the question becomes: how do I use the offset parameter and still page?See How to: Offsets and Paging « Weblog Tools Collection and WordPress ⺠Support » Query_posts, offset and pagination