Easily set the visibility of BuddyPress profile fields to hidden, allowing only admin users to edit and view them.
Easily set the visibility of BuddyPress profile fields to hidden, allowing only admin users to edit and view them.
GitHub
If you would like to contribute to the plugin, you can do so on GitHub.
bp-admin-only-profile-fields
to the /wp-content/plugins/
directory.In the WordPress admin area, go to Users > Profile Fields and click Edit on the desired profile field. Under the Default Visibility panel select Hidden as the value and click Save.
The profile field is now hidden from all users except Administrators.
Add the following filter to your theme’s functions.php file, substituting edit_others_posts with the desired capability:
function custom_profile_fields_visibility() {
return ‘edit_others_posts’; // Editors
}
add_filter( ‘bp_admin_only_profile_fields_cap’, ‘custom_profile_fields_visibility’ );