Hi @hammed4real101
You should be able to do this:
remove_action( 'bp_core_activated_user', 'bp_core_new_user_activity' );
@henry wright
please am not a pro developer yet, am still learning.
please, explain the steps to get that done.
am using a wordpress theme. Thanks
Just copy and paste it into your theme’s functions.php file.
hi @henrywright. Oooooooooooups ! No pasaran. 😉
@hammed4real101,
try this (add to child-theme functions.php or bp-custm.php) :
function swa_remove_new_member_activity( $a, $activities ) {
//allow site admin to see
if ( is_site_admin() )
return $activities;
foreach ( $activities->activities as $key => $activity ) {
// activity type name is new_member
if ( $activity->type =='new_member') {
unset( $activities->activities[$key] );
// recalculate activity items for pagination
$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;
// output
return $activities;
}
add_action('bp_has_activities','swa_remove_new_member_activity', 10, 2 );
FYI, so things be clear for every case.
Henry’s snippet works only for upcoming new_member.
The other snippet hides new and existing new_member.
@danbp thanks for adding to make a full solution 🙂