how can I display 1 post from each category in a static page?
-
Hi
I have a category called “fruit” and want to display the most recent post – 1 from each of 6 sub-categories, in two rows (3 on each)
sub-category 1 apples
sub-category 2 pears
sub-category 3 oranges
sub-category 4 bananas
sub-category 5 mango
sub-category 6 peachEach sub-category has multiple posts… and the main Fruit category page displays the most recent post from each category like this:
Category name (link to the cat)
Thumbnail of the most recent post in this cat (link to the cat)
Category description textI’ve managed to get my code working fine, but the categories keep moving on the page when I add a new post to any of the categories!
I just want the categories to remain static on the page, but display the most recent post as and when a new one is posted!
Help please !
Here’s my code:
[Code moderated as per the Forum Rules. Please use the pastebin]
- The topic ‘how can I display 1 post from each category in a static page?’ is closed to new replies.