• Resolved captainsupern00b

    (@captainsupern00b)


    Quick question: is it possible to create a single page listing all posts that were posted in two categories, that still has the older/newer posts navigation? I made a single page in the admin panel and associated it to a custom template I made, which uses query_post to pull in all the posts I need… but, the navigation doesn’t seem to work (when I click newer/previous, it just refreshes the page). After all my research I’m beginning to get the feeling this sort of navigation only exists for index and category pages, but I don’t quite understand why not for pages.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try using something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'cat' => '10,23',
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    in your custom template.

    Thread Starter captainsupern00b

    (@captainsupern00b)

    Wow, thank you very, very much! I’ve tried this code out and it works perfectly. The answer seems to lie in using the ‘paged’ variable, which wasn’t quite clearly explained in the codex description for query_posts. Thanks again, this is a big help!

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

The topic ‘Older/Newer Posts navigation not functioning’ is closed to new replies.