Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to Hide Forum Topics and Replies, But Not @Mentions in activity feed

@danbp

Participant

@tomnikkola,

as you discovered already, the CSS trick is a poor solution.
Two solution are on hand.
A first one, which applies to all activity feeds.
Basically the below snippet handles globally the activties output. You simply remove the activity(ies) you don’t want to see from the list. Note that almost all activity types are listed.
Add it to child functions.php or to bp-custom.php

function demo_parse( $retval ) {
	// existing BP/bbP activities
	// remove the one you wont to see from that list
	$retval['action'] = '
		activity_comment,
		activity_update,
		bbp_topic_create,
                bbp_reply_create,
		friendship_created,
		joined_group,
		last_activity,
		new_avatar,
		new_blog_post, 	
		new_member,
		updated_profile
	';	

	return $retval;
	
	}
add_filter( 'bp_after_has_activities_parse_args', 'demo_parse' );

Codex:

Using bp_parse_args() to filter BuddyPress template loops

The second solution, is to use a child-theme with a modified activity loop. This let you handle finer condition for each user.

Read this tut how you can do that.

Codex:

Activity Loop

Skip to toolbar