If there is one thing that I do not like about WordPress, it is the fact that it gives outdated options for user contact information. AIM? Yahoo? The internet has steadily moved away from these to things like Facebook and Twitter. After some digging around in the core files of WordPress and hunting on the internet, I’ve found a way to add custom user contact information fields in the ‘Users’ section of WordPress through the functions.php file (or custom_functions.php file if you use Thesis).
Let’s get started with our tutorial!
Setting Up the Function
The awesome thing about this tutorial is that we don’t need to mess with any of the core files in order to make this work. All we need to do is write our own function that determines the contact information input fields for our users.
Copy and paste the following code into your functions.php or custom_functions.php file:
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’);
/* END Custom User Contact Info */[/php]
Breaking Down the Code
Basically what is happening here is we are creating a new function called extra_contact_info and applying it as a filter to $user_contactmethods. You can learn more about $user_contactmethods by going to your wp-includes/registration.php file and scrolling to the very bottom to see the code for it.
Within this function we are adding some filters. The first set of filters is applying the unset rule, which essentially destroys (unsets) a previously set variable. What this means for you is that it causes WordPress to remove the default user contact information fields of “AIM”, “Yahoo”, and “Jabber/Google Talk”. If you would like to retain one or more of these fields, simply remove the line that references one of these three things.
The next set of filters creates new user contact information fields for us to use. In this example, I’ve created new fields that can be used for Facebook, Twitter and LinkedIn. All we are telling WordPress to do is register these new input fields for us.
Finally, we use add_filter in order to apply our changes.
Save your file and go to the “Edit” portion of your own user. You will notice that you have awesome new contact information fields that are actually relevant to your users! You can view an example of what it should look like in the image to our left.
Making Use of Our New Contact Fields
Making use of these fields is just as simple as displaying the author’s name, URL and number of posts he/she has made. We just apply a little PHP and bam, our user contact info is in use.
You can call any of these fields by using this PHP command:
[php]<a href="<?php the_author_meta(‘facebook’, $current_author->ID); ?>"></a>[/php]This creates a link to whatever URL your user entered in the “Facebook” contact field. Simply swap out ‘facebook’ for any other field that you defined in your function (for this example, ‘twitter’ or ‘linkedin’) in order to display that particular URL information.
Customizing your users contact information inputs is especially useful for post author boxes. Now you have the option of easily setting up Facebook and Twitter links for your guest posts.
Enjoy and let me know if you have any questions on how to get things done!

Pingback: How to easily modify user contact info
Pingback: How to Add Custom User Contact Info in WordPress | SHAWNSANDY.COM - DESIGN.IDEAS.CODE
Pingback: Añade o modifica las redes sociales en el perfil de usuario de Wordpress - sermdesign.com
Pingback: How to Modify WordPress User Contact Info | WordPress Hey - WordPress News, WordPress Themes, WordPress Plugins
Pingback: How to easily modify user contact info | Pertamaxxx
Pingback: Menambahkan Info Kontak Twitter, Facebook dan LinkedIn di Profil User | belajarwebdesign.com
Pingback: How to easily modify user contact info | WordPress Toolbag
Pingback: How to easily modify user contact info | Best of Blogger
Pingback: Awesome WordPress hacks to make your blogger life easier - CatsWhoCode.com
Pingback: Awesome WordPress hacks to make your blogger life easier | CSS Citadel
Pingback: Awesome WordPress hacks to make your blogger life easier | Cairns Web Design
Pingback: 6 Sencillos pero imprescindibles hacks para WordPress | davidcostales blog
Pingback: Website Design, Web Development, Content Management System, CMS Web Sites, Ecommerce Websites – Broadys Web Design | How to easily modify user contact info
Pingback: Awesome WordPress hacks to make your blogger life easier
Pingback: How to Add and Modify User Contact in Wordpress
Pingback: Shun the Plugin: 100 WordPress Code Snippets from Across the Net | WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org
Pingback: SFCite | Blog | Shun the Plugin: 100 WordPress Code Snippets from Across the Net
Pingback: 17 Great WordPress Hacks You Might Need Some Day - Daily feeds for Tech,apps,news,social media,games,videos,designing,freebie etc. — Daily feeds for Tech,apps,news,social media,games,videos,designing,freebie etc.
Pingback: Managing Multiple Authors: Customizing the Author Bio Box « Lorelle on WordPress
Pingback: Awesome WordPress hacks to make your blogger life easier – CatsWhoCode.com | Wordpress Training
Pingback: How to easily modify user contact info | WP Tutorials | Summer Study
Pingback: How to Easily Modify The Information Of User Contact in WordPress!