X

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);  
?>

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!