• Resolved dtirer

    (@dtirer)


    So I have a custom template that display posts from a particular category (depending on the get_post_meta(‘Category’)).

    The page works flawlessly for displaying posts from a ‘News’ Category. However, using the exact same code (minus how its displayed), it has problems with the Pagination for posts from the Calendar Category. Basically, the first page of posts display correctly, and then when you hit ‘next page’, the url updates to page/2, but the same posts are on the page.

    Here’s my code: http://pastebin.com/Zr7TsyNs

Viewing 1 replies (of 1 total)
  • Thread Starter dtirer

    (@dtirer)

    i figured it out. Because News is set to my front page, I need to use:

    <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1; ?>

    And the Calendar page (or any other) uses:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>

    subtle difference 🙂

Viewing 1 replies (of 1 total)

The topic ‘query_posts pagination problem’ is closed to new replies.