There is a global setting in the Admin area for setting the number of Posts to display on a page (located under Settings > Reading). Also there is a plugin “Custom Post Limits” that allows more fine-grained control for this setting, but you can also control it directly through the loop itself. For example, here we are overriding the default number of posts to display:
query_posts($query_string . '&showposts=6');
Custom Post Limits Plugin
This plugin allows you more fine-grained control over how many Posts are displayed for each type of page including search pages, category pages, archive pages, and everything else.
By default, WordPress provides a single configuration setting to control how many posts should be listed on your blog. This value applies to the front page listing, author listings, archive listings, category listings, tag listings, and search results. This plugin allows you to override that value for each of those different sections.
Specifically, this plugin allows you to define limits for:
- Authors archives (the archive listing of posts for any author)
- Author archives (the archive listing of posts for any specific author)
- Categories archives (the archive listings of posts for any category)
- Category archive (the archive listings of posts for any specific category)
- Date-based archives (the archive listings of posts for any date)
- Day archives (the archive listings of posts for any day)
- Front page (the listing of posts on the front page of the blog)
- Month archives (the archive listings of posts for any month)
- Search results (the listing of search results)
- Tags archives (the archive listings of posts for any tag)
- Tag archive (the archive listings of posts for any specific tag)
- Year archives (the archive listings of posts for any year)
If the limit field is empty or 0 for a particular section type, then the default post limit will apply. If the value is set to -1, then there will be NO limit for that section (meaning ALL posts will be shown). The Archives Limit value is also treated as the default limit for Day, Month, and Year archives, unless those are explicitly defined.
Share Your Thoughts