Skip to:
Content
Pages
Categories
Search
Top
Bottom

use bp_core_time_since() in blog pages

  • @hamedhemmati

    Participant

    How can I use the relative time buddypress uses in the blog pages. I know bp_core_time_since() converts the time to relative time and I would like to show the same time format for my blog posts on the index.php and single.php but I can’t figure out how to use this function. I tried bp_core_time_since(the_date()) but still just shows the date.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @hamedhemmati

    Participant

    Does anyone know how to do this?

    @boonebgorges

    Keymaster

    This is just off the top of my head, but try `echo bp_core_time_since( strtotime( get_the_date() ) );`

    @hamedhemmati

    Participant

    awesome! Thanks Boone that worked perfectly.

    @hamedhemmati

    Participant

    One other question about time since can bp_message_thread_last_post_date() be converted to a time since format as well? I tried replacing it with bp_the_thread_message_time_since() but it says 11 years, 5 months ago.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘use bp_core_time_since() in blog pages’ is closed to new replies.
Skip to toolbar