[wp-hackers]Treat most recent post differently to the rest
Alex Hempton-Smith
hempsworth at googlemail.com
Thu Jan 15 00:15:14 GMT 2009
Hi all,
On my category archives page, I'm outputting the first post into a different
HTML structure, and then outputting the rest of them below that as normal.
<?php
$recentPosts = new WP_Query();
$recentPosts->query('showposts=1');
while ($recentPosts->have_posts()) : $recentPosts->the_post();
?>
DOING SOMETHING WEIRD TO THE MOST RECENT POST HERE
<?php
endwhile;
while (have_posts()) : the_post(); ?>
OUTPUTTING THE REST NORMALLY HERE
<?php endwhile; ?>
Because I've already outputted that most recent post, how do I exclude it
from the main output below that?
Almost like offset the output to start 1 post later than the most recent
ones.
Hope this makes sense :)
Many thanks,
-- Alex
More information about the wp-hackers
mailing list