BUDDYBOSS WEB

Your community, courses and memberships on your own website.

BUDDYBOSS APP

Your own branded app on iOS and Android.

DONE FOR YOU

We build, launch and run it for you.

BuddyBoss website and mobile app

Web + App Done For You

$4,999 flat

Web Scale + Done For You Web

App Launch + Done For You App

PRICING

Web Pricing

Launch, Scale and Done For You Web.

From

$199

first year

App Pricing

Solo, Launch and Done For You App.

From

$499

first year

SITE + APP

Web + App Done For You

Your site and your app, built and run for you.

$4,999

flat, never rises

How to Change the Time and Date Format in Messaging

Updated

Introduction

The BuddyBoss messaging feature does not currently include a built-in option to customize how time and date formats are displayed. To adjust this behavior, custom code is required. As a workaround, you can apply a custom function that syncs the message date and time format with the settings defined in your WordPress dashboard. This guide explains how to change the time and date format in messaging.

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  2. Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, open Theme Functions (functions.php).
  4. Add the following code just before the closing PHP tag (?>):
function bb_change_date_format_to_wp_date( $output ) {
    $date_format = get_option( 'date_format' );
    if ( empty( $date_format ) ) {
        return $output;
    }
    return date_i18n( $date_format, strtotime( $output ) );
}
add_filter( 'bb_get_thread_start_date', 'bb_change_date_format_to_wp_date' );

function bb_change_time_format_to_wp_time( $site_sent_date ) {
    if ( function_exists( 'bp_get_the_thread_message_date_sent' ) ) {
        $sent_date = bp_get_the_thread_message_date_sent();
        $sent_date_formatted = wp_date( 'Y-m-d h:i:s', $sent_date );
        $site_sent_date = get_date_from_gmt( $sent_date_formatted );

        $time_format = get_option( 'time_format' );
        $time_format = ! empty( $time_format ) ? $time_format : 'g:i a';

        $site_sent_date = wp_date( $time_format, strtotime( $site_sent_date ) );
    }
    return $site_sent_date;
}
add_filter( 'bb_get_the_thread_message_sent_time', 'bb_change_time_format_to_wp_time', 99, 1 );

  1. Click Update File to save the changes.

Once the code has been added successfully, navigate to WordPress Admin > Settings > General. From there, update your preferred Date Format and Time Format. The messaging timestamps will now reflect those settings.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: Where do I change the date and time format after adding the code?
A: Go to Settings > General in your WordPress dashboard and update the Date Format and Time Format fields.

Q: Will this affect other parts of my site?
A: Yes. The formats used here are pulled from the global WordPress date and time settings, which may also affect other areas that rely on those settings.

Q: Does this apply to existing messages?
A: Yes. Existing message timestamps will display using the updated format.

Q: Is this officially supported by BuddyBoss?
A: No. This solution is a custom workaround and not part of the default BuddyBoss feature set.

Was this article helpful?

Subscribe to Our Newsletter

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form

Can’t find the answer you’re looking for?

Our support team is here to help with anything the docs don’t cover.