# 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.

- Type: PHP
- Runs: Run everywhere
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: buddypress, privacy, profile
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/buddypress-hide-last-active-time/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "BuddyPress: Hide "Active X Minutes Ago" on Profiles" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
