I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is very very appreciated, thanks! rock n roll.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
My approach. No extra function, no filter. :)
Alternative:
|
|||||||||
|
|
||||
|
|
|
if your theme uses post_class() to generate post classes you could try. i'm not 100% sure how it will handle pagination b/c i don't have enough posts on my local install to test it out
|
|||||||||||
|
|
As an addition to @helgathevikings answer Use the post_class() fn without polluting the global namespace
|
|||||||||||||||
|
