Forums

Next/previous links not working in category (6 posts)

  1. meriadoctookme
    Member
    Posted 1 year ago #

    Hello!

    I searched this one but couldn't find a resolve.

    I have a link on my site that goes to a page dedicated to one category (say cat-3). I set it up on category-3.php and the posts show up. Except when I tried to add prev and next links, the previous pages do not show older posts. It just shows the same newest posts. This problem also came up when I used WP-pagenavi. The 'page 2" link just linked to the same recent posts. Any help would be appreciated!

    Thank you.

  2. danielhay
    Member
    Posted 1 year ago #

    I have the same issue. Im pulling posts from a specific category onto a page template.. When clicking through the pagination (also using wp-pagenavi) the same posts appear.

  3. danielhay
    Member
    Posted 1 year ago #

    Found a fix to this problem on this thread: http://wordpress.org/support/topic/57912?replies=9#post-312858

  4. meriadoctookme
    Member
    Posted 1 year ago #

    How did you implement it into your site? I'm a tad confused. What is it fixing?

  5. danielhay
    Member
    Posted 1 year ago #

    Sorry about that, should have been a bit more specific. Im not This is the snippet of code I used from the thread I mentioned earlier.

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("paged=$paged");

    It gets the page value so WP knows what posts to display. It fixed wp-pagenavi for my site like a charm.

  6. rjoshicool
    Member
    Posted 1 year ago #

    Hi,
    I was having the same problem. Using this method, next an previous are working for index.php but when i go to a particular category, the navigation buttons are not even displayed! Please help me out..

Topic Closed

This topic has been closed to new replies.

About this Topic