How do I display a custom field for a specific role, but not display it on the profile page of the admin? When admin goes to edit a profile user that this role, the field will visible.
I created two fields for Subscriber role, but the fields appears on admin profile page. I need to display these fields only if admin goes to the profile page of subscribers.
function show_custom_field_for_subscriber(){
if( current_user_can('administrator') || current_user_can('subscriber') ) {
//code html for display the fields
}
add_action( 'show_user_profile', 'show_custom_field_for_subscriber' );