This will hide fields on the profile edit page and on the register page.
You need to add the field IDs.
Put the function in bp-custom.php.
function oazar_hide_profile_fields( $retval ) {
if( is_super_admin () )
return $retval;
if( bp_is_profile_edit() || bp_is_register_page() )
$retval['exclude_fields'] = '3'; //field ID's separated by comma
return $retval;
}
add_filter( 'bp_after_has_profile_parse_args', 'oazar_hide_profile_fields' );
Hello and thanks so much for your help !
I have a question :
where is the bp-custom.php file ? Am I supposed to create it ?
I am not a developper, and not used to bp structure, so can you tell me more precisely where the file is ?
thanks..
Did you follow the link in my answer?
oops ! Soory, i had not realized this was a link..
thanks for your help Shane,
I am testing it right now…
hello again Shane,
well it doesn’t work…
i created the file, placed it in at the root of the plugin folder, and then aked to exclude one field to begin with, but this won’t work.
maybe this has to do with “groups” ? i am using the x-profile plugon, and I have 3 groups of fields, so maybe I should also mention the group ID as well as the field ID ?