Add/remove contact info fields

The “Contact Info” fields in the edit profile page in WP-Admin is missing some important fields, like Twitter and Facebook. To add or remove fields from this section, just add the following to your functions.php.

Take a look at this snippet to display the users information.

Code Snippet:

<?php
function new_contactmethods( $contactmethods ) {
    $contactmethods&#91;'twitter'&#93; = 'Twitter'; // Add Twitter
    $contactmethods&#91;'facebook'&#93; = 'Facebook'; // Add Facebook
    unset($contactmethods&#91;'yim'&#93;); // Remove YIM
    unset($contactmethods&#91;'aim'&#93;); // Remove AIM
    unset($contactmethods&#91;'jabber'&#93;); // Remove Jabber

    return $contactmethods;
}
add_filter('user_contactmethods','new_contactmethods',10,1);  
?>

Posted in Admin area