Hi Brajesh,
I am trying to hide the activities of the admins and editor roles from the activity stream, so that other users (subscribers, authors) cannot see these in their stream (including group streams)
I saw this snippet https://buddydev.com/hiding-users-on-buddypress-based-site/ , and your profile privacy plugin but those are for hiding members profiles, and not activities as i understand.
Any suggestions how i can achieve this?
thanks,
VivekHello Vivek,
Thank you for posting. Try the following code to remove activities of user from activity directory.
add_filter( 'bp_after_has_activities_parse_args', function( $args ) { if ( ! bp_is_activity_directory() ) { return $args; } $args['filter_query'][] = array( 'column' => 'user_id', 'value' => '1,4', // Replace by your user ids. 'compare' => 'NOT IN', ); return $args; } );
Please let me know if it works or not.
Regards
RaviThanks very much for this, Ravi – much appreciated.
Will check this out and let you know.
thanks, vivek
The topic ‘ [Resolved] Hide activities of Admins & Editors in activitiy stream’ is closed to new replies.