function my_user_contactmethods($user_contactmethods){
$user_contactmethods['twitter'] = 'Twitter Username';
$user_contactmethods['facebook'] = 'Facebook Username';
return $user_contactmethods;
}
add_filter('user_contactmethods', 'my_user_contactmethods');
By default, WordPress allow users to enter an AIM name on their profile, but no Facebook and no Twitter names! But in 2012, those websites are far more popular than the good old AIM (ah, memories…).
In order to add more contact methods to user profile, simply paste this hook in your functions.php file. In this example it will add Facebook and Twitter, but it can be used for any website or service you need.
→ Source: http://wp.tutsplus.com/tutorials/quick-tip-add-extra-contact-methods-t
In order to add more contact methods to user profile, simply paste this hook in your functions.php file. In this example it will add Facebook and Twitter, but it can be used for any website or service you need.
→ Source: http://wp.tutsplus.com/tutorials/quick-tip-add-extra-contact-methods-t
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.