0

I need help about kriesi pagination... I can see it but it's not working. When I click on page 2, it shows the content of the first page.

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
<?php query_posts( array
    (   'post_type'=>'post',
        'posts_per_page' => 3,
        'paged' => $paged
        )); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>" class="middle-post">
        <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    </article>
<?php endwhile; kriesi_pagination();  endif;  wp_reset_query();   ?>

1 Answers1

2

Most possible your $paged variable isn't set correctly. Instead of your first line you can try this code:

if (get_query_var('paged')) { 
    $paged = get_query_var('paged'); 
} elseif (get_query_var('page')) { 
    $paged = get_query_var('page'); 
} else { 
    $paged = 1; 
}
Grzegorz Pawlik
  • 2,198
  • 1
  • 18
  • 18
  • YES, Thanks a lot! I have tried numbers of solutions, non of them worked. Thanks again! – user3481434 Mar 13 '15 at 08:20
  • Please just let me know how, I can't find the option. – user3481434 Mar 14 '15 at 19:32
  • On the left side of the answer, under the number (currently "0") you can find a "checked" icon. Just click it. Just for your information the arrows on the top and bottom of the number are used to upvote and downvote the questions/answers. – Grzegorz Pawlik Mar 14 '15 at 20:39
  • Sure, I know that :) The thing is that I can't vote because I need 15 reputation... I thought that I can mark this post as completed – user3481434 Mar 15 '15 at 21:40
  • True :) Never mind, althought thats strange that you cannot see the "checked" icon there (to be clear: the same as e.g. here: http://stackoverflow.com/questions/28836291/prevent-overscroll-on-fullscreen-web-app-like-google-maps-do) – Grzegorz Pawlik Mar 15 '15 at 21:55