BuddyPress: Hide "Active X Minutes Ago" on Profiles
Removes the "active 5 minutes ago" timestamps from BuddyPress profiles and the members directory, for communities where members value privacy.
Opens WPIDE on
Code
if ( ! function_exists( 'buddypress' ) ) {
return;
}
add_filter( 'bp_get_last_activity', '__return_empty_string' );
add_filter( 'bp_member_last_active', '__return_empty_string' );
add_filter( 'bp_get_member_last_active', '__return_empty_string' );
Notes
BuddyPress still records activity internally, so "Active" sorting in the directory keeps working.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.