Add Twitter and Facebook info fields

Add Twitter and Facebook info fields

By default, WordPress allows you to add various contact info as such as Jabber, AIM and Yahoo Messenger. But there’s no way to add your Twitter and Facebook info. Here’s a handy code snippet to remove the mostly useless YIM, AIM and Jabber and add Twitter and Facebook info instead.

This code goes to your functions.php file.

function new_contactmethods( $contactmethods ) {
$contactmethods[‘twitter’] = ‘Twitter’; // Add Twitter
$contactmethods[‘facebook’] = ‘Facebook’; // Add Facebook
unset($contactmethods[‘yim’]); // Remove YIM
unset($contactmethods[‘aim’]); // Remove AIM
unset($contactmethods[‘jabber’]); // Remove Jabber

return $contactmethods;
}
add_filter(‘user_contactmethods’,’new_contactmethods’,10,1);