• Here is my site: https://sports.wnur.org

    What I’m trying to do is have one featured story on the left side. I have accomplished this by having a category called “featured.” Right now, a story might be in two categories (ie, “featured” and “football”). If this is the case, it won’t display at all in the middle column, since I have excluded the “featured” category, to avoid duplicating the featured story.

    What I want to have is all stories that are not the most recent featured story (including older stories and stories that were never “featured”) display in the middle column.

    How can I go about doing this?

    Here is my loop code as it stands:

    <h2>Latest News</h2>
    			<!-- Loop for latest news -->
    			<?php $oddentry = 'class="gray" '; ?>
    			<?php query_posts('cat=6,7,8,9,10,11,12,16&showposts=7'); ?>
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     <?php if (in_category('5')) continue; ?>
    			<div <?php echo $oddentry; ?>>
    				<div class="midcolumnpost">
    					<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    					<?php the_excerpt_reloaded(30, '<img><a>', 'content', false, 'More...', true);?>
    					<div class="details">
    						<?php $cat = get_the_category_list_excludeCat(', '); echo $cat; ?> | <?php the_time('F j, Y'); ?> |<!-- NO COMMENTS<?php comments_popup_link(__('Leave comment'), __('1 Comment'), __('% Comments'));?> |--> <a href="<?php echo get_permalink(); ?>" title="More">More</a>
    					</div>
    				</div>
    			</div>
    			<?php /* Changes every other post to a different class */	$oddentry = ( empty( $oddentry ) ) ? 'class="gray" ' : ''; ?>
    			<!-- End of Loop for middle column -->
    			<?php endwhile; else : ?>
    			<?php endif; ?>
  • The topic ‘Show all stories but the most recent in a category’ is closed to new replies.