Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: I am trying to remove activity comments as separate entries

@danbp

Participant

Create first a bp-custom.php file and add it to the plugins directory.

Than add these snippet, which let you handle activities which may not be commented.

function browserco_activity_nocomment( $can_comment = true, $type = '' ) {
        if ( empty( $can_comment ) ) {
                return $can_comment;
        }
		
        // list of activities which can't be commented
        $cant_comment_types = array( 
				'new_forum_topic' => 1,
				'new_forum_post' => 1,
        );
 
        return ! isset( $cant_comment_types[ $type ] );
}
add_filter( 'bp_activity_can_comment', 'browserco_activity_nocomment', 10, 2 );

Some BP activity types
activity_comment
activity_update
last_activity
friendship_created
joined_group
new_blog_post
new_avatar
updated_profile

Note that some plugins add their own activity types. To get activity type names, go to the DB and check the “type” column in _bp_activity table.

Skip to toolbar