Multiple Loops “Previous Entries” Problem
-
Hi. I’ve setup 2 loops on my homepage, each displays 5 posts, but a little differently. I got the code to do this from: WP Recipes. You can see the site I’m working on here: Wenatchee Fitness Blog
The loops work well, however when someone clicks “Previous Entries” at the bottom, page2 just shows the same 10 entries.
Any ideas on how this could be fixed? The code I’m using is below:
<!-- First loop, we only get the most recent post--> <?php query_posts('showposts=5'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> ...display the most recent 5 posts in here... <?php endwhile; ?> <?php endif; ?> <!-- Second loop, we get 5 posts excluding the most recent.--> <?php query_posts('showposts=5&offset=5'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> ...display the next 5 posts in here... <?php endwhile; ?> <?php endif; ?>
With all of the content inside the …display… section.
Thanks in advance for your help!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Multiple Loops “Previous Entries” Problem’ is closed to new replies.