Add Extra Fields to User Profile Page, WordPress user profile extra fields

 In Functions, Wordpress Admin

Add Extra Fields to User Profile Page

Hack: Extra User Details

WordPress is still living in the stone age with its contact forms in the User Profile section (AIM? Yahoo IM?). Fortunately, you can add more current contact methods with this simple code snippet

Add Extra Fields to User Profile Page, WordPress user profile extra fields code snippet, you just need to add the code snippet below to your WordPress theme’s functions.php file.


add_filter('user_contactmethods', 'ns_user_contactmethods');

function ns_user_contactmethods($user_contactmethods){

  $user_contactmethods['twitter'] = 'Twitter Username';
  $user_contactmethods['facebook'] = 'Facebook Username';

  return $user_contactmethods;
}

As you can see, each new contact method just needs a name and a label.

 

Read more about userdata here

Thank you for seeing my tutorial and fell free to share and comment 🙂 . Do you have a code snippet and you want to see it publish on my site ? I will be more than happy to do it please send me a message (here)

Recent Posts

Leave a Comment

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.

Availability

  • May - Booked
  • June - Booked
  • July - Limited

Rates

  • My day rate is £300.
  • I can provide a fixed price for your work.
  • Projects start at around £2,000.

Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.