Remove nickname and display name fields

4.07K viewsGeneral
0

Hi, I’ve been searching the questions for a while but either I’m misunderstanding something or there isn’t anyone else asking!

Can you please show me how I can remove 2 fields from the profile. Nickname and display name, specifically.

Thank you! – Great plugin.

1

Add this :

add_filter('ap_user_fields', 'my_remove_fields_anspress');
function my_remove_fields_anspress( $fields ){
	foreach( $fields['basic'] as $k => $field ){
		if( in_array($field['name'], array('nickname', 'display_name') ) ){
			unset($fields['basic'][$k]);
		}
	}

	return $fields;
}

Perfect, thanks!!