My website: http://www.affordyourpassions.net
I have my blog set up with a slider on the front page; a featured post, and then 7 additional grid (magazine?) posts, for a total of 8 posts on the home page.
The front page content length aligns pretty closely with the sidebar content.
On the 2nd and subsequent pages, there are 8 posts per page, but without the featured image, or the featured post, the sidebar content extends much further, so there is a lot of white space.
Is there a way to change the number of posts on 2nd and subsequent pages, so that I have more grid posts so that it matches the length of the sidebar?
You wouldn’t believe how difficult that is to do correctly. You need to use the pre_get_posts action to set the correct number of posts on the front page and then if is paged you set a different number of posts and use an offset to make sure things don’t get missed. Because of the way the offset works you must have more posts on the first page and fewer posts on subsequent pages.
Getting more posts on subsequent pages doesn’t work nearly as well because you can’t do a negative offset
The topic ‘Changing # of posts per page on 2nd and subsequent pages…’ is closed to new replies.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.