#111585
 Laura
Moderator

Hello, try adding this to functions.php of child theme

COPY CODE

// Remove (hide) various activities from streams.
function my_hidden_activities($a, $activities) {
//if admin we want to know
//if (is_site_admin())
//	return $activities;

$nothanks = array(“created_group”, “joined_group”, “new_member”, “friendship_created”, “activity_liked”);

foreach ($activities->activities as $key => $activity) {
if (in_array($activity->type, $nothanks, true)) {
unset($activities->activities[$key]);
$activities->activity_count = $activities->activity_count-1;
$activities->total_activity_count = $activities->total_activity_count-1;
$activities->pag_num = $activities->pag_num -1;
}
}

// Renumber the array keys to account for missing items.
$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;

return $activities;
}
add_action(‘bp_has_activities’, ‘my_hidden_activities’, 10, 2 );
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

Laura Solanes - Graphic Designer and Web Designer

Please be patient as I try to answer each topic as fast as i can.

If you like the theme or the support you've received please consider leaving us a review on Themeforest!

Always happy to help you 🙂

Log in with your credentials

Forgot your details?