WordPress.org

Ready to get started?Download WordPress

Forums

Display a list of categories that have recent posts in them? (3 posts)

  1. Sunfeet22
    Member
    Posted 5 years ago #

    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.

    I've tried:

    <?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?

  2. Joni
    Member
    Posted 5 years ago #

    Unfortunately, this is the best you can prolly hope for. If you've looked for plugins, then I'm out of ideas too. :(

    show_last_updated
        (boolean) Should the last updated timestamp for posts be displayed (TRUE) or not (FALSE). Defaults to FALSE.
        * 1 (true)
        * 0 (false) - default
  3. Sunfeet22
    Member
    Posted 5 years ago #

    Thanks Joni,

    I have tried that also and it didn't seem to do anything. I'll give it a shot again though.

    Thanks for responding. I was beginning to think I was alone in here!

Topic Closed

This topic has been closed to new replies.

About this Topic