• I’m running multiple loops on my index page. It starts with the “featured entry” (most recent, excluding certain categories), then some DOMtabs (each with the most recent post of one specific category), and below this, all other entries not belonging to the categories in the DOMtabs but showing the same categories as the “featured entry” box.

    I can get the “featured entry” box to exclude the DOMtabs categories like I want, and the DOMtabs are working fine, showing only the category I want.

    But for the bottom portion, I can’t get it to not repeat the “featured” entry. I essentially want it to start on the second most recent entry, but nothing I try has worked. I’ve tried offsetting, no dice.

    My index page:

    <?php get_header(); ?>
    
    	<div id="content-container">
    
    		<div id="content">
    
    			<?php if($paged < 2) { // front page ?>
    
    			<?php $count = 1 ?><?php while(have_posts()) : the_post(); ?>
    
    			<?php if($count==1) { ?>
    
    			<div class="featured-content">
    
    			<?php } elseif($count==2 || $count==5 || $count==8) { ?>
    
    			<div class="normal-content<?php if($count==2) { echo ' first-row'; } ?>">
    
    			<?php } ?>
    
    				<div id="post-<?php the_ID(); ?>" class="post-alt">
    
    					<?php if($count==1) { ?>
    
    					<a href="<?php the_permalink(); ?>"><img src="<?php echo get_post_meta($post->ID, "Thumbnail Full", true); ?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" class="alignleft" /></a>
    
    					<?php } else { ?>
    
    					<a href="<?php the_permalink(); ?>"><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" class="alignleft" /></a>
    
    					<?php } ?>
    
    					<div class="entry-title-alt"><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
    
    					<?php if($count!=1) { ?><div class="entry-date"><?php the_time('F j, Y'); ?></div><?php } ?>
    
    					<div class="entry-content-alt">
    
    						<?php the_excerpt(); ?>
    
    						<?php edit_post_link('Edit', '<p>', '</p>'); ?>
    
    					</div>
    
    					<div class="entry-meta-alt">
    
    						<a href="<?php the_permalink(); ?>" class="full-story"><?php if($count==1) { ?><img src="<?php bloginfo('template_directory'); ?>/images/button-full-story.gif" alt="Full Story" /><?php } else { ?>Read more<?php } ?></a>
    
    						<?php if($count!=1) { ?><span class="comments-link"><?php comments_popup_link('Post a comment', '1 Comment', '% Comments'); ?></span><?php } ?>
    
    					</div>
    
    				</div>
    
    			<?php if($count==1) { ?>
    
    				<div class="multi-purpose">
    
    					<?php include (TEMPLATEPATH . '/domtab.php'); ?>
    
    				</div><!--[if !IE]>end .multi-purpose<![endif]-->
    
    			</div><!--[if !IE]>end .featured-content<![endif]-->
    
    			<?php } elseif($count==4 || $count==7 || $count==10) { ?>
    
    			</div><!--[if !IE]>end .normal-content<![endif]-->
    
    			<?php } ?>
    
    			<?php $count = $count + 1; ?>
    
    			<?php endwhile; ?>
    
    			<?php } else { ?>
    
    			<?php $count = 1 ?><?php while(have_posts()) : the_post(); ?>
    
    			<?php if($count==1 || $count==4 || $count==7 || $count==10) { ?>
    
    			<div class="normal-content<?php if($count==1) { echo ' first-row'; } ?>">
    
    			<?php } ?>
    
    				<div id="post-<?php the_ID(); ?>" class="post-alt">
    
    					<a href="<?php the_permalink(); ?>"><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" class="alignleft" /></a>
    
    					<div class="entry-title-alt"><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
    
    					<div class="entry-date"><?php the_time('F j, Y'); ?></div>
    
    					<div class="entry-content-alt">
    
    						<?php the_excerpt(); ?>
    
    						<?php edit_post_link('Edit', '<p>', '</p>'); ?>
    
    					</div>
    
    					<div class="entry-meta-alt">
    
    						<a href="<?php the_permalink(); ?>" class="full-story">Read more</a>
    
    						<span class="comments-link"><?php comments_popup_link('Post a comment', '1 Comment', '% Comments'); ?></span>
    
    					</div>
    
    				</div>
    
    			<?php if($count==3 || $count==6 || $count==9 || $count==10) { ?>
    
    			</div><!--[if !IE]>end .normal-content<![endif]-->
    
    			<?php } ?>
    
    			<?php $count = $count + 1; ?>
    
    			<?php endwhile; ?>
    
    			<?php } ?>
    
    			<div class="navigation">
    
    				<div class="nav-previous"><?php next_posts_link('&laquo; Next page') ?></div>
    
    				<div class="nav-next"><?php previous_posts_link('Previous page &raquo;') ?></div>
    
    			</div><!--[if !IE]>end .navigation<![endif]-->
    
    		</div><!--[if !IE]>end #content<![endif]-->
    
    	</div><!--[if !IE]>end #content-container<![endif]-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Multiple loops, duplicate entries showing’ is closed to new replies.