Query Posts-previous five posts how?
Hey there, I would like to use the admin panel setting to show a certain number of posts on my blog say 5, but then I would like to do a query posts after that initial loop and show a list of the previous 5 posts (post id and title permalink only). I want it to be category independent, meaning it doesnt matter what category the posts are in, just show the next 5 in chronological order.
*and as an alternate, is there a way to show the next 5 as a random list also?
the one I’ve got now shows 5 posts but it shows the same 5 posts as the initial loop (I have 5 set in wp admin to show)
<?php query_posts('showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<li><?php the_ID(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"></a></li>
<?php endwhile; ?>
- The topic ‘Query Posts-previous five posts how?’ is closed to new replies.