Pagination for Category Archive Page Template

Community Forums Forums General Discussion Pagination for Category Archive Page Template

This topic is: resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Gary Jones 9 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #60915

    electricbrick
    Participant
    Post count: 62

    For client-specific reasons, I’ve set up a page template showing a single category with 1 post per page.

    The pagination is not working — all “pages” end up showing ONLY the first post. I definitely know it has something to do with the query and custom loop I’ve borrowed. I just can’t figure out where to go from here.

    http://gist.github.com/electricbrick/6455575

    • This topic was modified 10 months, 3 weeks ago by  electricbrick.
    • This topic was modified 10 months, 3 weeks ago by  electricbrick.
    • This topic was modified 10 months, 3 weeks ago by  electricbrick.
    • This topic was modified 10 months, 3 weeks ago by  electricbrick.
    http://www.brewers-alley.com/menu/daily-specials/
    #67506

    Gary Jones
    Moderator
    Post count: 686

    You need to explicetly keep track of the page you’re on. Add the following to the $args array:

    [php]
    ‘paged’ => get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1;
    [/php]


    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1 and 2.1.1 (all 88 of them!) | @GaryJ

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.