Reply To: Disable comments in activity
Hi,
Comments who are already registered in activities stay in the feed. If you don’t want to see them, you have to remove them manually in the activity manager.
Once an activity comment is deactivated, the button isn’t visible in the feed.
Try this method and add the code to bp-custom.php, so you stay also theme independant.
function bpfr_activity_nocomment( $can_comment = true, $type = '' ) {
if ( empty( $can_comment ) ) {
return $can_comment;
}
//handling the activity types we want to disable
//to get activity type names, go to the DB and check the "type" column in xx_bp_activity table
$cant_comment_types = array(
'new_forum_topic' => 1,
'new_forum_post' => 1,
);
return ! isset( $cant_comment_types[ $type ] );
}
add_filter( 'bp_activity_can_comment', 'bpfr_activity_nocomment', 10, 2 );