Add/remove contact info fields in WordPress user profiles
Not many subscribers to WordPress blogs take the time to fill out contact information on their profile pages. Perhaps a reason for this is that the area is not well promoted, but it could also be that the contact fields are not relevant to some people. The default profile page for WordPress users include input fields for AIM, YIM and Jabber, among others, but wouldn’t it be great if you could add other fields to the set or remove a few of the existing ones? Quite a few people use Facebook and Twitter; why not add fields so they can link to their presence on these social networks? In this post, I will show you how it can easily be done by editing your theme’s functions.php file.
Locate your theme’s functions.php file and open it in a simple text editor. Append with the following lines of code and modify depending on which fields you want to add or remove. Save and visit your profile to test.
// Add extra contact info to user profile page
function extra_contact_info($contactmethods) {
unset($contactmethods['aim']);
unset($contactmethods['yim']);
unset($contactmethods['jabber']);
$contactmethods['facebook'] = 'Facebook';
$contactmethods['twitter'] = 'Twitter';
$contactmethods['linkedin'] = 'LinkedIn';
return $contactmethods;
}
add_filter('user_contactmethods', 'extra_contact_info');
The code is pretty simple to understand. Fields that you want to remove are preceded with unset; those that you want to add are not.

thank you for this! there is only one more thing. You have to add the line of code to the autor-info.php of the theme so the template can show the facebook or linkedin links. Anyways, thanks for this helpful info.
Zona de Arte
11 March, 2011 at 9:11 PM
Yes, the other step would be modifying the relevant page template to display this information. But I will leave that for another post.
falcon1986
28 April, 2011 at 10:15 AM