Under Reading Settings, I can specify how many blog posts to display on a page. However, I would like to customize this a bit. For example, I want to only display 2 posts on the "/" page, but 3 posts on "/page/2", "/page/3", etc. Any way to customize the homepage to display one less post than the other pages?
|
There is no option to change the number of posts per page, archive, tag or category from the admin but you can use query_posts()
what it does is check to see if you are on the home page or front page and if you are then it changes the number of posts to show. another example is to show different number of posts for different categories:
here we use the conditional tag is_category() to check which category we are in based on that we set the number of posts to display. For cats we set 7, for dogs we set 4 and if its just random category we display 10. |
|||
|
|
|
http://coffee2code.com/wp-plugins/custom-post-limits/ By default, WordPress provides a single configuration option to control how many posts should be listed on your blog. This value applies for the front page listing, archive listings, category listings, tag listings, and search results. Custom Post Limits allows you to override that value for each of those different sections. Specifically, this plugin allows you to define limits for:
|
|||
|
|
offsetvariable yourself to get a good effect. – Jan Fabry Apr 16 '11 at 14:23<!--more-->(codex.wordpress.org/Template_Tags/the_content) and I'm quite happy about it. – moose Apr 28 '12 at 5:33