Reply To: [Resolved] how to make some xprofile field to uneditable
To make a field uneditable, you can remove it from the edit page of each profile.
You just have to enter the file ID, separated by coma if necessary to hide more than one.
Add snippet to child-theme functions.php or bp-custom.php
function bpfr_make_profile_field_uneditable( $retval ) {
if( is_user_logged_in() && bp_is_profile_edit() ) {
$retval['exclude_fields'] = '20,21,22'; // field id's
}
return $retval;
}
add_filter( 'bp_after_has_profile_parse_args', 'bpfr_make_profile_field_uneditable' );
Reference: