Treehouse: Grow your CSS skills. Land your dream job.

Paging broken on category template

  • # May 11, 2011 at 12:02 pm

    With WordPress, I am using a category specific template file (category-3.php) to display 5 posts at a time. I am using the following for paging:

    < ?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts($paged . '&posts_per_page=5&cat=3&paged=' .$paged);

    I’ve been using this for a while now along with the wp-pagenavi plugin and it’s worked fine.

    Recently I noticed that clicking page 1 and 2 were fine, but any subsequent page after that cannot find posts? Am I doing something wrong?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.