[theme-reviewers] Pagination Question

Philip Walton philip at philipwalton.com
Fri Apr 22 20:34:05 UTC 2011


I'm making a theme for a client, and I'm coming up with an interesting 
issues that I thought I'd run by you all before I do anything too hackish.

Basically I'm making a theme where, according to the design, the home 
page should display 9 posts, but every other page should display 10. The 
10 page design shows only the excerpts and looks like stacked blocks: 2 
columns, five high (all excerpts are equal height and width). The reason 
there's only 9 posts on the home page is because the first post shows 
the entire content, and then there's the stacked blocks below that first 
post. Basically, in order to make it symmetrical, there needs to be an 
odd number of posts displayed on the first page, but an even number on 
every other page.

So here's my question:

If I say posts_per_page = 9 on the home page, but 10 on every other 
page, the pagination messes up. When I go to page 2 I either skip a post 
or show a post that was also shown on the home page.

Can anyone think of a way to make page 1 be 1-9 and the subsequent pages 
10-19, 20-29, 30-39, etc?

I've come up with nothing so far and I'd rather not have to manually 
filter the limit in the MySQL query.




More information about the theme-reviewers mailing list