I want 5 posts on my front page but 10 posts on subsequent pages (page 2, 3, ..).
In my Settings > Reading > Blog pages show at most > I have 10. But I want to show only 5 posts on the front page, so in index.php I use this :
if ( $paged <= 1 ) $posts = query_posts($query_string.'&posts_per_page=5&paged='.$paged);
Works fine except that.. In page 2, the 6th to 10th posts don’t show. As if, from page 2, WP « thought » that the front page has actually displayed the 10 first posts, not just 5.
What can I do ?
There is a
post_limits
hook that you can use for this purpose exactly:Try this:
Sorry, just got bored and am trawling through the archives. You could go with this:
Try this.