How to Limit Activity Comment Depth in BuddyPress

BuddyPress 2.0 was released this week with many new administrative tools that make it easier to manage communities from the backend. One of the lesser known new features is the ability to limit comment depth in the activity stream.

old-threaded-commentsActivity threads can sometimes get out of control when it comes to replies, which results in the comments box getting progressively squished to an inconveniently small size.

In the past, the only way to change the comment depth was to filter the output of the bp_activity_can_comment_reply() function, but this wasn’t very user-friendly for community managers.

Since WordPress already has a built-in setting for comment depth, this was a natural fit for activity comments and did not require adding any new settings. BuddyPress 2.0 now respects WordPress’ comment depth settings. You can adjust them in the admin at Settings > Discussion > Other Comment Settings.

threaded-comments

In the following example, threaded comments have been set to three. You’ll notice that the third comment has no reply link beneath it. Members can still comment on the activity item itself but will not be able to add more than three replies.

activity-comments

This update shouldn’t affect the structure of your previous activity comments/replies, but it will be in effect for threaded comments moving forward. If you’ve been itching to to limit activity comment depth on your BuddyPress site, this new setting makes it easy to set a limit, without having to touch any code.

3

3 responses to “How to Limit Activity Comment Depth in BuddyPress”

  1. Hi Sarah! I’m trying to limit the number of activity items in the activity feed. Other answers refer to editing activity-loop.php. I can’t see this file in my folders – they all have names like bp-activity-actions.php & bp-activity-admin.php. Any idea where I’d find activity-loop.php (if it still exists in the latest version of BP)?

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.