WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Pagination by Year with multiple loops, or loop inside of a loop.

[Resolved] Pagination by Year with multiple loops, or loop inside of a loop.

  • Hello all,

    I am trying to create a page that runs two loops, or a loop inside of a loop that divides my archives into year groups and paginates two years at a time. So far I’ve been able to produce two groups of years using a loop within a loop, but when I try to paginate it, it breaks. You can see what I have running here: http://ck.prosthes.us/cat/exhibitions

    My code:
    http://pastebin.com/DiriZaQc

    Any help is much appreciated. Thanks!

    Josh

Viewing 2 replies - 1 through 2 (of 2 total)
  • Oh, I wanted to note, it is not the Ajax that is breaking it, as it also does not work when it is disabled.

    -J

    So I wound up running the two loops with wp_reset_query and using a PHP Session variable to navigate between years as the pages advanced or receded. So, not true pagination, but sufficient for my purposes.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Pagination by Year with multiple loops, or loop inside of a loop.’ is closed to new replies.
Skip to toolbar