Let's say I have a regular main page listing posts, like in any regular WP blog. Now, I'd like to achieve this: if it's the first post in the list, use some layout, if second, another layout, if third, then another layout and so on. Even better: if it's post 1, 5, 9, 15, 22 -> use layout 1 . If it's 2,3,8, 12,14 -> use layout 2 (basically, adding re-usable code)
post 1 -> <div class="layout1">....</div> post 2 -> <div class="layout2">....</div> post 3 -> <div class="layout3">....</div> post 4 -> <div class="layout1">....</div> post 5 -> <div class="layout1">....</div>
(so there's no "every given number of posts, use layout x", but "if in spot X, use layout X")
I know I can do this with CSS, it's a snap, but it's not smart at all, since I want to use different post-thumbnail sizes, so loading big images for small sizes is ridiculous.
I tried looking for WP conditionals, if_post and what not, but couldn't find anything, so really no clue on how to achieve this (without using masonry, which will have the same post_thumbnail problem)
Any ideas on how to do this?
Thanx in advance and Happy New Year for everybody! :)