Forum Replies Created

Viewing 1 replies (of 1 total)
  • Like several other users, I am trying to limit the number of posts on the home page. I have narrowed it down to this code in home.php:

    <div id="works">
    			<div class="minus14">
    				<?php // Featurd Work goes first
    					$the_query = new WP_Query('category_name=featured&showposts=1');
    					while ($the_query->have_posts()) : $the_query->the_post();
    					$do_not_duplicate = $post->ID;
    					// We show just one post of category work and don't duplicate it after | http://codex.ww.wp.xz.cn/The_Loop#Multiple_Loops_in_Action
    				?>
    
    					<div class="thumb">
    						<a href="<?php the_permalink() ?>" title="View Case Study - <?php the_title_attribute(); ?>"><img src="<?php $src_thumb_value = get_post_meta($post->ID, "src_thumb_value", true); echo $src_thumb_value; ?>" width="276" height="115" alt="<?php the_title_attribute(); ?>" title="Thumb of <?php the_title_attribute(); ?>" /></a>
    					</div><!-- .thumb -->
    
    				<?php endwhile; ?>
    
    				<?php // Rest of works
    					if (have_posts()) : while (have_posts()) : the_post();
    					if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts);
    					// http://codex.ww.wp.xz.cn/The_Loop#Multiple_Loops_in_Action
    				?>
    
    					<div class="thumb">
    						<a href="<?php the_permalink() ?>" title="View Case Study - <?php the_title_attribute(); ?>"><img src="<?php $src_thumb_value = get_post_meta($post->ID, "src_thumb_value", true); echo $src_thumb_value; ?>" width="276" height="115" alt="<?php the_title_attribute(); ?>" title="Thumb of <?php the_title_attribute(); ?>" /></a>
    					</div><!-- .thumb -->
    
    				<?php endwhile; endif; ?>
    
    			</div><!-- .minus14 -->
    		</div><!-- #work -->

    However, I do not have enough PHP experience to know what to edit to keep thumbnails from repeating after one row.

    Can anyone help?

    Thanks!

Viewing 1 replies (of 1 total)