Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BuddyPress - Hide Group Activities in Global Feed
<?php
/**
* BuddyPress - Hide Group Activities in Global Feed
*/
function yzc_hide_group_activity_args( $args ) {
if ( ! bp_is_activity_directory() ) {
return $args;
}
$args['filter_query'] = array(
array(
'column' => 'component',
'value' => 'groups',
'compare' => '!='
)
);
return $args;
}
add_filter( 'bp_after_has_activities_parse_args', 'yzc_hide_group_activity_args', 9999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment