Filter State-Wide Activities From Groups
-
Hi there,
I have searched far and wide for a solution to filter Activites from Public Groups. I have managed to filter Groups with this code ` function bp_filter_groups_from_activity( $a, $activities ) {
if ( bp_is_current_component( ‘activity’ ) ) {
foreach ( $activities->activities as $key => $activity ) {if ( $activity->component ==’groups’) {
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;
}
}$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;}
return $activities;
}
add_action(‘bp_has_activities’,’bp_filter_groups_from_activity’, 10, 2 );`
But every time a user posts in the Activity Stream the post shows up in all Groups that the user is a member of.I would like to have Group comments separately like Facebook Groups.
Any help would be appreciated.
Thanks a bunch.
Naomi
- You must be logged in to reply to this topic.