Display a list of categories that have recent posts in them?
I want to display a list of categories in my sidebar (children of another category), and have them ordered by the categories with the newest posts first, and so on down the list.
For example, I have a category called “Photo Galleries” and within that category, have children for specific photo galleries like “Landscapes”, “Portraits”, etc.
If I add a new post to “Portraits” I want that category to display at the top of the list in the sidebar under a heading “Newest Photos” so that people will know which categories have the latest updates to them.
<?php wp_list_categories('&title_li=0&show_count=0&child_of=7'); ?>
which displays the children categories like I want, now if I could only sort them by freshness we’d be in business.
Is this just a pipe dream? Any help would be awesome as I’m at my wits end on this issue. I’ve tried some category cloud plugins but none of them will sort the way I want. Is there another plugin out there that will accomplish this?
- The topic ‘Display a list of categories that have recent posts in them?’ is closed to new replies.