WordPress.org

Ready to get started?Download WordPress

Forums

Displaying new post in category list (3 posts)

  1. loudigi
    Member
    Posted 6 years ago #

    with wp_list_categories is there a way to show when there are new post in the category? I've tried:

    wp_list_categories('orderby=id&show_last_updated=1&include=55,21,51,49,53,54,52,50,56&title_li=<h2>' . __('Category names'). '</h2>' );?>

    but the show_last_updated doesn't do anything. Basically I just want some sort of notification next to the category name showing that there is a new entery. Wheter is the date of the last update or a "new" every time there is a new post. Any thoughts?

  2. texet
    Member
    Posted 5 years ago #

    show_last_updated does not work for me, either. In the Codex, it's called "show_last_update" in one place, but that may be a typo. Anyway, it did not work either.

    Anybody figure out how to get show_last_updated to work?

    UPDATE: I have a limited understanding, but I THINK this is a WP bug/issue that was filed in the bug tracker about a year ago with no activity for the past 11 months:

    http://trac.wordpress.org/ticket/5029

  3. raffav
    Member
    Posted 5 years ago #

    this code work for me

    get_categories( 'orderby=rand()&hide_empty=1&include_last_update_time=1&hierarchical=1&number=6&exclude=5,25);

    i simply tried to overwrite the orderby functions with a different possible options [rand()];
    i hope this help to solve the bug.

Topic Closed

This topic has been closed to new replies.

About this Topic