Title: limiting posts display
Last modified: August 18, 2016

---

# limiting posts display

 *  [edfladung](https://wordpress.org/support/users/edfladung/)
 * (@edfladung)
 * [21 years ago](https://wordpress.org/support/topic/limiting-posts-display/)
 * Hi Guys,
 * I have a wp blog I’m setting up here: [mosbef.com](http://mosbef.com)
 * I have the “display posts” pref set to 100, in options. so that every post shows
   up in it’s proper category page (my posts are images). But since the display 
   posts option is such a high number, on the index page of the blog it lists every
   post. that is a large number of photos. What I’d like to do is to limit the post
   display to 10 posts, but only on my index page.
 * Is it possible to pass a variable to the have_posts function that limits the 
   wp loop to, let’s say, 10 iterations?
 * like this maybe: `<?php if (have_posts('10')) : ?>`
 * obviously I’ve tried this and it doesn’t work. anyone got any ideas?
 * thanks in advance
 * **Update:** Ok so i found a thread on [Single Post Homepages](http://wordpress.org/support/topic/11211)
   and this seems to answer my question. or at least it works great. if anyone has
   any more info please leave it here, for my own benefit as well as the benefit
   of people trying to do something similar down the road. thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years ago](https://wordpress.org/support/topic/limiting-posts-display/#post-217979)
 * There’s a couple plugins that make it easy to manage posts per page based on 
   query type (i.e. category, archive, etc):
 * [http://mattread.com/archives/2005/03/custom-query-string-plugin/](http://mattread.com/archives/2005/03/custom-query-string-plugin/)
   
   [http://rephrase.net/miscellany/05/perpage.phps](http://rephrase.net/miscellany/05/perpage.phps)
 * (2nd is a sort of update of the one shown in your forum link above)
 *  [njbair](https://wordpress.org/support/users/njbair/)
 * (@njbair)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/limiting-posts-display/#post-218566)
 * Here is something I do in order to show the first full posts, and then excerpts
   of the other 9. This is in WP 1.51.
 * `<div class="entry">
    <?php $number_of_posts++; if ($number_of_posts > 1) { echo
   the_excerpt(); } else { echo the_content('Read the rest of this entry &raquo;');}?
   > </div>

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘limiting posts display’ is closed to new replies.

## Tags

 * [have_posts()](https://wordpress.org/support/topic-tag/have_posts/)
 * [limit](https://wordpress.org/support/topic-tag/limit/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [njbair](https://wordpress.org/support/users/njbair/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/limiting-posts-display/#post-218566)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
