Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing a blog page that requires 3 different post styles (Ie; one full page width with featured image and content, one full page width without featured image and the rest are half page width) so I have been using an offset query.

The problem I'm having is that I can't figure out how to force page 2,3, etc. to only use the half page width styles. On top of that I can't get pagination to work anyway

Is this even possible?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Offset explicitly doesn't work with pagination. You can have either, but not both in same query.

share|improve this answer
    
I feared as much. Is there any way I can style posts differently without offset then? –  Dean Elliott Nov 8 '11 at 11:58
    
@Dean Elliott ehm, of course :) just keep a count when you loop and change markup conditionally... I don't completely get what you are doing to advise something more specific. –  Rarst Nov 8 '11 at 12:07
    
Check this image out, forgive the crudity of it - deanelliott.me/misc/layout.jpg this would be page 1 of the blog, and then on other pages all posts would look the same as post 3,4, etc. –  Dean Elliott Nov 8 '11 at 12:32
1  
@Dean Elliott seems easy enough... as above - just keep count when you are looping... and output markup, depending on count. –  Rarst Nov 8 '11 at 12:40
    
for the page2 etc question: combine the markup dependency on the count with the conditional tag is_paged() codex.wordpress.org/Function_Reference/is_paged –  Michael Nov 8 '11 at 15:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.