Add extra contact method in wordpress user profiles

WordPress has only two contact fields in users profile that is email and website. That may not be sufficient as there are many social networking sites (like Google+,facebook, twitter etc) are available to connect with users. We can add more contact methods in contact info section. To add more fields edit functions.php file in your WordPress theme folder and add below code.

function new_contactmethods( $contactmethods ) {
    $contactmethods['twitter'] = 'Twitter'; // Add Twitter
    $contactmethods['facebook'] = 'Facebook'; // Add Facebook
    $contactmethods['google'] = 'Google+'; // Add Google+
    return $contactmethods;
}
add_filter('user_contactmethods','new_contactmethods',10,1);  

Above code will add Twitter, Facebook and Google+ fields in contact info section

Published by Sunny

A Mechanical engineer by education and web developer by passion and profession. He lives in Lucknow, India. Currently earning his livings by hitting keyboad. ;)

Leave a comment

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