DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

The default user profile allows users to display their msn, aim, jabber and yahoo messenger adresses. But in 2010, you might want to add more recents services such as Twitter or Facebook. Here’s a recipe to do so.

Simply paste the following function into your theme functions.php file. Lines 2, 3 and 4 are for removing unnecesseray items, and lines 5, 6 and 7 add news items. That’s simple as that.

function extra_contact_info($contactmethods) {
    $contactmethods['facebook'] = 'Facebook';
    $contactmethods['twitter'] = 'Twitter';
    $contactmethods['linkedin'] = 'LinkedIn';

    return $contactmethods;
add_filter('user_contactmethods', 'extra_contact_info');

Advanced users would probably enjoy this class which allow you to manage user contact info easily.

Big thanks Thomas Griffin for the snippet!


Leave a Comment

Your email address will not be published. Required fields are marked *