Multiple loops with pagination on single post page
-
I am trying to use multiple loops on a single post page and when I try to use pagination the pages all link back to the single post page.
For example i have the usual loop in the single.php file:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Then below that I have another loop to simply display the latest posts:
<?php if (is_single()) { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged"); } ?>
The latest posts display fine. I have it set to show 30 posts before it pages. The pagination shows up fine at the bottom but the links all point back to the single post page. I am using the WP-PageNavi plugin but cant tell if that is causing the problem. Anyone know a way to get the page links to link correctly?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Multiple loops with pagination on single post page’ is closed to new replies.