Hello to everyone,
i’m tring to hide some fields from the page profile.php to avoid the users can edit passwords, mail and others custom field but i couldn’t find a properly way to do that.
i tried this lines but they didn’t hide the label password and the input related to password fields
add_action( ‘init’, ‘disable_password_fields’, 10 );
function disable_password_fields() {
if ( !current_user_can( ‘administrator’ ) )
$show_password_fields = add_filter( ‘show_password_fields’, ‘__return_false’ );
}
Is there a way to list fields and custom fields to hide in profile.php?
Thanks in advance,
Simone