Excluding the latest post
-
Hi! I’m trying to implement a magazine style theme. I’m using Mimbo 2.2 but have changed the “feature” section so that it now shows the latest post from an array of categories.
Code is the rather banal <?php query_posts(‘showposts=1’); ?>
In other areas in the same page I’m showing the latest article from each category.<?php $display_categories = array(5,6,7);
foreach ($display_categories as $category) { ?>
<div class=”clearfloat”> <?php query_posts(“showposts=1&cat=$category”);
$wp_query->is_category = false;
$wp_query->is_archive = false;
$wp_query->is_home = true;
?>Now, is there any code I can use to exclude the latest post if it is already shown in the “feature” section so that it doesn’t get duplicated in the page? I was thinking of a code which says that if the post is the latest in general (not only within the category), then the 2nd latest post in the category should be shown…
Thanks in advance for the help
- The topic ‘Excluding the latest post’ is closed to new replies.