WordPress Function to Remove default fields contact info user profile and replace them with something more usable

Remove default fields contact info user profile and replace them with something more usable

The second part of this function has already been mentioned above, but removing the default fields – AIM, Yahoo IM and Jabber/Google Talk – not yet:

function update_contact_methods( $contactmethods ) {

// Remove annoying and unwanted default fields  
unset($contactmethods['aim']);  
unset($contactmethods['jabber']);  
unset($contactmethods['yim']);  

// Add new fields  
$contactmethods['phone'] = 'Phone';  
$contactmethods['mobile'] = 'Mobile';  
$contactmethods['address'] = 'Address';  

return $contactmethods;
}
add_filter('user_contactmethods', 'update_contact_methods');

Of course you can add as many fields as you want (see previous examples earlier in this thread) under “Add new fields”

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *