WordPress.org

Support

Support » Themes and Templates » Custom Template Pagination

Custom Template Pagination

  • Greetings all,

    I have a custom page template that I’m trying to paginate using a custom loop. When you click the next link it takes you to my 404 page saying the page doesn’t exist, but when I print the $query_string it shows paged=2&pagename=games. Any thoughts as to what I am doing wrong?
    <? global $paged; query_posts('post_type=game&orderby=title&order=asc&paged=' . $paged); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    Try:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('post_type=game&orderby=title&order=asc&paged=' . $paged); ?>

    Unfortunately that did not work. Any other ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Template Pagination’ is closed to new replies.
Skip to toolbar