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 Disable Comments for a Specific User

Updated

Introduction

By default, BuddyBoss does not provide a built-in option to disable comments for individual users. You can achieve this by adding a small custom function to your active theme. This will prevent a specific user or user type from posting comments on activity feeds.

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 (?>):

add_filter(‘bp_nouveau_get_activity_entry_buttons’, ‘remove_comment_activity’);

function remove_comment_activity( $return ) {

    $current_user_id = bbp_get_current_user_id();

    $member_type = bp_get_member_type($current_user_id, true);

    // Change 'individual' to the member type you want to restrict

    if ( $member_type == 'individual' ) {

        unset( $return['activity_conversation'] );

    }

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

This code removes the Comment button from the activity feed for users of a specific member type. You can adjust the ‘individual’ value to target the desired member type or modify the logic to target a specific user ID.

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: The comment button is still visible.
A: Make sure the member type matches the one specified in the code. You can debug by checking the user’s member type with bp_get_member_type($user_id, true).

Q: Does this prevent other users from commenting?
A: No. This only affects the users or member types specified in the code.

Q: Can I revert this change easily?
A: Yes. Remove or comment out the code from functions.php and save the file.

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.