Remove the unwanted fields & add new fields to WordPress contact

By | January 13, 2012

Remove the unwanted fields from WordPress contact info

In WordPress there are fields such as aim, yim, jabber which are not used by most of the sites.It can be removed by adding this code to the theme functions.php file.

function extra_contact_info($contactmethods)
 {
    unset($contactmethods['aim']);
    unset($contactmethods['yim']);
    unset($contactmethods['jabber']);
    return $contactmethods;
}
add_filter('user_contactmethods', 'extra_contact_info');

Add new fields to WordPress contact info

Information like Facebook username,Google profile,twitter username,YouTube username can be add to the contact fields.This will make you blog to be more social.

function extra_contact_info($contactmethods)
 {
    unset($contactmethods['aim']);
    unset($contactmethods['yim']);
    unset($contactmethods['jabber']);
    $contactmethods['facebook'] = 'Facebook';
    $contactmethods['twitter'] = 'Twitter';
    $contactmethods['linkedin'] = 'LinkedIn';
    $contactmethods['google_profile'] = 'Google Profile URL';
    $contactmethods['youtube'] = 'YouTube username';
    return $contactmethods;
}
add_filter('user_contactmethods', 'extra_contact_info');

This is how it will look after adding the function .

Leave a Reply

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

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.