1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Hide Comments on the Activity Feed

How to Hide Comments on the Activity Feed

Introduction

The BuddyBoss Platform does not include a built-in setting to disable comments on the Activity Feed. If you want to prevent members from commenting on activity posts, you can achieve this by adding a small custom function to your active theme. This guide walks you through how to hide comments on the Activity Feed using a simple workaround.

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_activity_can_comment', '__return_false' );
  1. Click Update File to save the changes.

Once applied, the comment option will be removed from activity posts across the Activity Feed.

Troubleshooting and FAQs

Q: Comments are still visible on the Activity Feed.
A: Make sure the code is added to your child theme’s functions.php file and not the parent theme. Clear any caching plugins and refresh the page.

Q: Does this remove existing comments?
A: No. This only disables the ability to add new comments. Existing comments will still be visible unless removed separately.

Q: Will this affect other areas like forum or blog comments?
A: No. This filter only applies to BuddyBoss/BuddyPress activity comments.

Q: Can I enable comments again later?
A: Yes. Simply remove or comment out the code:

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

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

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.