-
Author
-
March 3, 2016 at 02:40 #108146
blux89
Participanthow do i control or remove what my activity feed say i want to remove when it say, (became a registered member) and (are now friends)
March 4, 2016 at 17:50 #108609Laura
ModeratorHello, please try by adding this to functions.php of child theme
COPY CODE// Remove (hide) various activities from streams. function my_hidden_activities($a, $activities) { //if admin we want to know //if (is_site_admin()) // return $activities; $nothanks = array(ânew_memberâ, âfriendship_createdâ); foreach ($activities->activities as $key => $activity) { if (in_array($activity->type, $nothanks, true)) { unset($activities->activities[$key]); $activities->activity_count = $activities->activity_count-1; $activities->total_activity_count = $activities->total_activity_count-1; $activities->pag_num = $activities->pag_num -1; } } // Renumber the array keys to account for missing items. $activities_new = array_values( $activities->activities ); $activities->activities = $activities_new; return $activities; } add_action(âbp_has_activitiesâ, âmy_hidden_activitiesâ, 10, 2 );Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 9, 2016 at 03:17 #109379blux89
Participantthe code showed on the top of the page didnt work please help
March 10, 2016 at 19:19 #109835Laura
ModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! đHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 29, 2016 at 19:36 #113369Radu
ModeratorHi,
Please follow this link : https://buddypress.org/support/topic/removing-unnecessary-activity-feed-actions/
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.