Today, a SANGKRIT.net hosting owner requested us to help him out in filtering unwanted activity stream stuff in BuddyPress. He is running a BuddyPress based video sharing and networking website and what he was noticing is his activity steam populated with tons of updates on people joining groups, changing profile photos, posting on forums etc etc (just like old days Facebook).
He asked us how he can restrict what shows on the activity stream. All he wants to show (in activity stream) is only the status, @mentions and BuddyPress Activity Plus plugin updates.
Here the solution:
Simply start by logging in to your website hosting account and launch ‘File Manager‘ (or alternatively you may use FTP).
Visit your website’s root directory and navigate to wp-content -> plugins -> buddypress -> bp-templates -> bp-legacy -> buddypress -> activity and then open activity-loop.php for editing.
Lookup for this line of code:
<?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) : ?>
and update it to:
<?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘&action=activity_update’ ) ) : ?>
That’s it. Save the file and now the hack is going to filter the activity loop to show only activity updates.