Displaying one post from each category?
-
Well it might be a little more advanced then that. Here is my situation:
I want to display one post from each category on the front page… easy enough… but…
I want to know how many categories there are and to only pick from 3 of them… ALSO…
I only want to pick from the 3 which had the latest posts.
How would I go about doing this? I know how to query before the loop to get it to display one post from a certain category but how to i set it to display the latest post from a category?
To be more clear this is what im doing:
Im using categories like “Health, Entertainment, Technology” etc. and i want only one post from each of those on the front page, but say if i just posted a new post in “Health” i would want that to show up on the front page ABOVE the last post which may have been in “Entertainment”
Any help would be VERY VERY much appretiated!
The topic ‘Displaying one post from each category?’ is closed to new replies.