Want only rtMedia updates in my BP Activity Stream


#1

Currently my Buddy Press activity stream is set to display all, which does display the rtMedia updates, but it also displays all other activity. Ideally, I would like to filter the Activity Stream so it only shows rtMedia updates.

I saw the following response to a similar question, but I’m not sure how or where to apply the suggested code.

rtMedia stores an update as “rtmedia_update” in DB. Use this code to filter your activity:

<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ).'&action=activity_update,rtmedia_update' ) ) : ?>

This will also show the rtMedia updates.

I realize this may be a super basic request, but I’m new to this so a little help would be greatly appreciated! Thanks!


#2

Add this to your theme’s functions.php

//remove items from activity stream
function demo_parse( $retval ) {
	// existing BP/bbP activities
	// remove the one you wont to see from that list
	$retval['action'] = '
		activity_comment,
		rtmedia_update,
		last_activity,
	';	
	return $retval;
	}
add_filter( 'bp_after_has_activities_parse_args', 'demo_parse' );

#3

Awesome, that worked perfectly. Thank you so much!


#4

Hi @Taylan10

I am glad to know that it worked perfectly and thank @froster3 for your help in community. I am closing this topic now.


#5