Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active July 12, 2022 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/0fcddc13714f1a7cac1624aea99a830f to your computer and use it in GitHub Desktop.
Save KaineLabs/0fcddc13714f1a7cac1624aea99a830f to your computer and use it in GitHub Desktop.
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