DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

By default, WordPress allows you to enter some contact information on your user profile. For example, you can enter your aim or jabber screenname. But what about newer sites such as Twitter or Facebook? Here is a simple recipe to add new contact methods to your user profile.

Nothing complicated: Just paste the following code into your function.php file. Edit lines 4 and 5 according to your needs.

add_filter('user_contactmethods', 'my_user_contactmethods');

function my_user_contactmethods($user_contactmethods){
  $user_contactmethods['twitter'] = 'Twitter Username';
  $user_contactmethods['facebook'] = 'Facebook Username';

  return $user_contactmethods;

Hungry for code snippets? I just opened a snippet library on CatsWhoCode, which include lots of WordPress snippets. Have a look, and don’t hesitate to submit yours!

Thanks to TutsPlus for the cool tip!


  1. Thanks for the gr8 Tip. I am going to use it in my upcoming theme.
    Thanks 🙂

  2. Hey,

    This really is a great tip, did this just a few days ago, lot of people would find this extremely useful…

    I have a little question. I want to add a “Contact Number” field in the registration page as well as in the user profile page. Could anyone give a suggestion as to how to do it. I have already used Cimy Extra User Field plugin, looking for something else though!!

  3. How would you display the new contact methods in your theme? I am trying to improve the author template and Twitter and Facebook contact details will be a nice addition.

Leave a Comment

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