WordPress - Each page of paged posts all show same posts
- by j-man86
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:
<?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!