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 Set Forum Discussion Replies to Descending Order

Updated

Introduction

Forum discussion replies in BuddyBoss are displayed in ascending order by default. You can change this behavior so replies appear in descending order by adding a custom function to your active theme. This guide explains how you can set forum discussion replies to descending order.

Custom Workaround

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

  1. In your WordPress admin dashboard, go to Appearance > Theme Editor.
  2. Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, click Theme Functions (functions.php).
  4. Paste the following code just before the closing PHP tag (?>):
add_filter( 'bbp_before_has_replies_parse_args', 'buddyboss__change_replies_order' );

function buddyboss__change_replies_order( $r ) {

    $r['order'] = 'DESC';

    return $r;

}

add_filter( 'bb_get_parent_reply_position', 'buddyboss__get_parent_reply_position', 10, 3 );

function buddyboss__get_parent_reply_position( $reply_position, $reply_id, $topic_id ) {

    if ( empty( $reply_id ) ) {

        return false;

    }

    $top_level_reply_id = bbp_get_reply_ancestor_id( $reply_id );

    $parent_replies_ids = bb_get_parent_replies_ids( $topic_id, bbp_get_reply_post_type() );

    if ( ! empty( $parent_replies_ids ) ) {

        $reply_position = array_search( (string) $top_level_reply_id, $parent_replies_ids );

        $reply_position++;

    }

    return $reply_position;
}
  1. Click Update File to save your changes.

Note: Any modifications like this are considered custom work. Please review the BuddyBoss Support Policy for details.

Troubleshooting and FAQs

Q: Replies are still showing in ascending order, what should I check?
A: Make sure the code is added to the active theme’s functions.php and clear any caches.

Q: Will this affect existing forum replies?
A: Yes, it changes the display order for all replies within forum discussions.

Q: Does this affect other forum areas?
A: No, it only affects the reply order inside discussion topics.

Q: Can I revert this change easily?
A: Yes, remove the code from functions.php and save.

Q: Who can I contact for further assistance?
A: Check the BuddyBoss Support Policy or consult a developer.

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.