Code to Add Author Profile Fields

Do you want to add extra fields to your author profiles in WordPress?
You can easily do that by adding this code to your functions.php file:

function wpe_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//add Facebook
$contactmethods['facebook'] = 'Facebook';
return $contactmethods;

You can now display these fields in your author template like this:

<?php echo $curauth->twitter; ?>