How To Extend User Contact Info


Sponsored Links




WordPress 2.9 built with new ability to Extend User Contact Info, this tricks can be done by added some code on functions.php in your current theme. We can added many contact info, depend on your needed. To do extend user contact info, open the files and add this code

<?php
function my_new_contactmethods( $contactmethods ) {
    // Add Twitter
    $contactmethods['twitter'] = 'Twitter';
    //add Facebook
    $contactmethods['facebook'] = 'Facebook';

    return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?>


And the result of this tricks will be like this,

This is only basic usage, you can made it more complicated depend on your creative minds ;)

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net


5 Responses to How To Extend User Contact Info

  1. Nice tutorial, it doesn’t get much simpler than that now! The old script I used to do this was fairly short, but not as good as this, thanks! :D

  2. All of your tutorials are great. Cheers for taking the time to post them :)

  3. Very Nice!! This is what I’m looking for! Thanks!

  4. Donna Vitan says:

    Thanks for this. It’s a really simple way of adding new fields. Is there a way to also include a description span like “Usernames cannot be changed.”

    Thanks in advance.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>