Two loops, broken pagination
-
Here I have two loops each displaying 5 posts, this all works seemingly well until the navigation is brought into the equation, unfortunately far back you go in blog posts the second loop still displays the same 5 posts on every page.
I have read through the codex and added bits to the code (like paged) in the second loop but it still doesn’t seem to help
<?php global $query_string; $posts = query_posts($query_string.'posts_per_page=5') ?> <?php while ( have_posts() ) : the_post() ?> <?php the_content(); ?> <?php endwhile; ?> <?php posts_nav_link(); ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($query_string.'&showposts=5&offset=5&paged='.$paged); ?> <?php while ( have_posts() ) : the_post() ?> <?php the_content(); ?> <?php endwhile; ?> <?php posts_nav_link(); ?>What I am looking for is for both loops to go back/forward when clicking ‘next/previous page’
any assistance appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Two loops, broken pagination’ is closed to new replies.