I have been advised how to add additional contact info fields to the User admin area here (Click here).
However, I am not entirely sure how I can display the the field contents in a link within my template files.
Here is the code in my functions.php:
add_filter( 'user_contactmethods', 'more_contactmethods' );
function more_contactmethods( $contactmethods ) {
$contactmethods['twitter'] = 'Twitter URL';
$contactmethods['facebook'] = 'Facebook URL';
$contactmethods['linkedin'] = 'LinkedIn URL';
return $contactmethods;
}
And here’s the code in one of my template files, but it doesn’t seem to work, so I wonder whether I can actually do it this way?
<?php
$twitter = get_usermeta( $user_id, 'facebook' );
$facebook = get_usermeta( $user_id, 'twitter' );
$linkedin = get_usermeta( $user_id, 'linkedin' );
?>
<a href="<?php echo $twitter ?>" id="twitterBtn" title="Visit our Twitter page">Visit our Twitter page</a>
This might help you out if you haven’t found an answer yet.
Displaying it:
http://thomasgriffinmedia.com/blog/2010/09/how-to-add-custom-user-contact-info-in-wordpress/
This works fine in Thesis. Here’s the full tutorial
http://wpsites.net/how-to-wordpress/how-to-addremove-custom-user-profile-contact-info-links-to-your-author-box/