How To Add Extra User Information To WordPress

Now that WordPress is being used more and more as a content management system (CMS), people have often requested ways to allow members or registered users to add more information about themselves like Twitter, Facebook and address fields.
Screen shot of user profile

Depending on the site, I’ve often used a plugin called CIMY Extra User Fields. But if you’re using Wishlist member to control your content, CIMY is in their known list not to play nicely together.

The good news is, you can add additional user fields without a plugin. The following code goes into your theme’s function.php file. It will add a new ‘block’ of fields under the default ones. I have only set them to two fields but you can add more of course. A little hacking of course is necessary to add more. If you’re not that adventurous, you can always hire us 🙂

// Additional fields
add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );

function extra_user_profile_fields( $user ) { ?>

!

Hey! I want to make sure you know what you're getting here. In addition to the guide, you will also receive our memo that includes special offers, announcements and of course actionable information.

Terms and Conditions checkbox is required.
Something went wrong. Please check your entries and try again.
Facebook Comments

5 Comments

  1. Alexandra Debelnogich on June 2, 2011 at 3:10 pm

    How about being able to enter a whole lot more information than just Facebook & Twitter? What if you wanted to have a robust profile, one that includes skills and experiences? Something you would enter when you create a resume profile on a job board.

    Can this be done? This would be for a particular membership group.

    I would like to create another membership group that can query, using the various fields of the initial membership profile to locate people with particular skills?

    Any ideas on this?



    • Alexandra Debelnogich on June 2, 2011 at 3:11 pm

      I also wanted to mention that I would like to use pages as opposed to posts in this WordPress website.



    • Lynette on June 3, 2011 at 1:14 am

      I’ve seen it being done yes. This will require a lot more thought and coding. Entering more information into the profile is the easiest part. It’s simply a matter of extending the code in the example. But information in the profile is (I believe) only good for short snippets of information. If you are talking about a full blown resume, that may require more exploration. I’m also not clear about using Pages. Are you saying you want the individual profile to be on a page or a list of many profiles in a page. Perhaps using custom post types might be better and more flexible than extending the user profile.



  2. James Dudley on July 13, 2011 at 12:50 pm

    Thank you so much. This worked perfectly. We needed to add a bunch of custom profile fields, and we’re using WishList Member. WLM has a really cool ability to add custom fields to custom registration forms, but fails to allow you to access that data or do anything with it! (FAIL) So we had to create the custom profile fields ourselves, and this was a good work-around.

    We’re also using WLM in conjuction with Mingle, so it will be interesting to integrate these new custom profile fields into the mingle profile edit/view page. (that’s our next step)



    • Lynette on July 14, 2011 at 12:05 pm

      Excellent! Thank you so much for letting us know how that went. I’m sure others would find that encouraging. Good luck on the Mingle integration. Sounds like an interesting challenge 🙂