carjackd
Member
Posted 10 months ago #
I'd like to display the most recent 7 posts from multiple categories on the homepage and style the most recent post in each category differently. I currently have this working fine on my dev, but i'd like to show different post content in the most recent post and less in the subsequent posts.
basically id like to say:
if {
this is the most recent post in category A, display the title, author, featured image and exerpt and style it like this
}
else {
display just the title and style it like this.
}
Thanks for any help you can give!
carjackd
Member
Posted 10 months ago #
To clarify... it would be 7 posts from category "A" in one div, 7 posts from category "B" in another, 7 posts from category "C" in another and so on.
I currently have this working fine on my dev, but i'd like to show different post content in the most recent post and less in the subsequent posts.
what code are you using for the loops?
(please use the http://pastebin.com/ if the code is longer than 10 lines)
you could use a counter for each loop, and on $count==1 style the post differently;
carjackd
Member
Posted 10 months ago #
Here's the link to category "A" code
http://pastebin.com/1MTUb63N
Thanks for the quick response!
http://pastebin.com/S0epdqFS
might need refining on the html structure of the last 6 posts.
carjackd
Member
Posted 10 months ago #
oh wow... awesome - thanks so much!
@alchymyth or anyone who knows,
What is the way to display posts from whatever the current category is, rather than hard-coding an actual category name?