Title: evangogh's Replies | WordPress.org

---

# evangogh

  [  ](https://wordpress.org/support/users/evangogh/)

 *   [Profile](https://wordpress.org/support/users/evangogh/)
 *   [Topics Started](https://wordpress.org/support/users/evangogh/topics/)
 *   [Replies Created](https://wordpress.org/support/users/evangogh/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/evangogh/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/evangogh/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/evangogh/engagements/)
 *   [Favorites](https://wordpress.org/support/users/evangogh/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Portfolio – WPESP Theme](https://wordpress.org/support/topic/portfolio-wpesp-theme/)
 *  [evangogh](https://wordpress.org/support/users/evangogh/)
 * (@evangogh)
 * [17 years ago](https://wordpress.org/support/topic/portfolio-wpesp-theme/page/4/#post-947211)
 * 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.wordpress.org/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.wordpress.org/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)