Dicas Web: Add extra contact methods to user profiles

By default, WordPress allow users to enter an AIM name on their profile, but no Facebook and no Twitter names! But in 2012, those websites are far more popular than the good old AIM (ah, memories…).

In order to add more contact methods to user profile, simply paste this hook in your functions.php file. In this example it will add Facebook and Twitter, but it can be used for any website or service you need.

function my_user_contactmethods($user_contactmethods){

$user_contactmethods[‘twitter’] = ‘Twitter Username’;

$user_contactmethods[‘facebook’] = ‘Facebook Username’;

return $user_contactmethods;

}

add_filter(‘user_contactmethods’, ‘my_user_contactmethods’);