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 );
Hi
bp-custom.php put only this code?
i putt in wp-content-plugin ?
i put the code in this route but not work
webbuild
@vproios
8 years, 4 months ago
Hello i have buddypress 2.4.3 and i want to disable comments in activity . I add this code in functions.php of my theme
add_filter(‘bp_activity_can_comment’,’__return_false’);
but the comments still exist.
How can i disable the comments and make the button invisible from site-wide activity ?