Skip to:
Content
Pages
Categories
Search
Top
Bottom

Localize Reply Date Stamp


  • dmalkin
    Participant

    @dmalkin

    Having a really difficult time figuring out a way to output topic reply time stamps in a users local timezone. I have a forum with global users and this is a necessity.

    WP version: 4.9.8
    bbPress version: 2.5.14

    Currently using this plugin: Localize Time (https://wordpress.org/plugins/localize-time/)

    I am wrapping the bbp_get_reply_post_date() with the shortcode [localize_time]; however, I cannot alter the format of the output date from the shortcode.

    I need an alternate solution.

Viewing 1 replies (of 1 total)

  • dmalkin
    Participant

    @dmalkin

    // Time Variable
    $localTime = str_replace('at ', '', $localTime);
    
    $localTime = do_shortcode('[localize_time before_local=" " after_local=" " fmt="F j, Y g:i a"]'.$localTime.'[/localize_time]');
    echo $localTime;
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar