Skip to:

Single Reply Freshness instead of Exact Post Date

  • highexistence


    In the BBpress 2.0 plugin, single replies show the exact date posted instead of X hours ago/freshness format. How can I switch this back to freshness format?

Viewing 7 replies - 1 through 7 (of 7 total)

  • John James Jacoby


    It’s always been like this. You’ll need to create a custom template tag to output a formatted time to your liking.



    Then why is it functioning like that on, but not in the plugin? Can you post that template tag?



    Anyone else interested, place this in your functions.php file:

    function bbp_get_reply_last_active_time( $reply_id ) {

    $last_active = get_post_field( 'post_date', $reply_id );

    $last_active = !empty( $last_active ) ? bbp_get_time_since( bbp_convert_date( $last_active ) ) . ' ago' : '';

    return $last_active;


    and then call it in loop-single-reply.php

    Okay. I’ve added this to my functions.php and I’m calling it but I’m not certain of how exactly to call it, evidently, as it’s not working. I’ve tried a couple of different variations so umm, how exactly are you calling this?

    John James Jacoby


    Most likely directly in a custom theme’s template file, where ever it’s appropriate.



    Wow. Thanks for responding so FAST. I guess I worded my question badly. I knew to place it in that file, I’ve already done so, what I mean is that I’ve tried several variations of calling the function and it returns nothing so I’m evidently not calling it correctly. For instance, my last effort was…

    $reply_id = bbp_get_reply_id(); bbp_get_reply_last_active_time( $reply_id );

    … and I’ve also tried to call it with just…

    bbp_get_reply_last_active_time( $reply_id );

    … which also returned nothing at all.

    No go? No idea how to call this properly?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar