Use two different WordPress loops

October 27, 2008

Maybe you wants to get the most recent posts first, and later create a new loops getting the 5 next posts, excluding the most recent post. To achieve what you wants to do, we have to use the query_posts() function with the showposts and offset parameters. The first loop: query_posts('showposts=1'); // First loop, we only get the most recent post if (have_posts()) : while (have_posts()) : the_post(); ?> // WordPress loop endwhile; endif; ?> The second loop: query_posts('showposts=5&offset=1');... [Read the full story]

Page 2 of 2«12