By default, the platform does not have this option. You can use the following Function.php code to achieve this.
Please try adding the below Function in your theme files by following these steps:
1. Go to Appearance > Theme Editor
2. Under “Select theme to edit”, choose (BuddyBoss Child/Whatever theme is active), then click “Select”.
3. Below Theme Files, select Theme Functions (functions.php).
4. Append the following just before the closing PHP tag “?>”:
function bbp_hide_members_directory() {
if ( bp_is_members_directory() ) {
bp_do_404();
load_template( get_404_template() );
exit( 0 );
}
}
add_action( 'bp_template_redirect', 'bbp_hide_members_directory' );
5. Click “Update File” to save the changes.
Note: Any modifications are considered custom work already. Know more about our Support policy here: https://www.buddyboss.com/support-policy/
With the code:
Without the Code:
Did you find it helpful? Yes No
Send feedback