Post Count related formatting?
-
I’m trying to set up a blog that auto formats posts based on their recency in the post-counts. So, the latest story would have ‘feature’ formatting, the next four would have ‘sub-feature’ and the next four probably just a one-line link.
I know it’s probably possible to do this with custom keys, but I don’t really want to have to change all the metadata every time I add a new post. Is there a way to do this via the post count? I’m imagining in psuedo code:
If (this post_num = latest post){ style it as a feature }else if(this post_num > post_count - 4 & < latest post){ style it as a sub-feature }else if ((this post_num > post_count - 8 & < post_count - 4){ style it as one liner }else{ dump it in the archives/don't display on front page }
I’ve had a good search around and can only find the custom keys method, but it seems to me this should be possible to automate. Or is this a really clunky way of doing it?
(Added info: I can hack around in PHP, especially given some example code, but I’m not that competent in it.)
- The topic ‘Post Count related formatting?’ is closed to new replies.