I’m adding a number of items to the user profiles using this method in my functions.php
function modify_contact_methods($profile_fields) {
// Add new fields
$profile_fields['twitter'] = 'Twitter Username';
$profile_fields['facebook'] = 'Facebook URL';
$profile_fields['gplus'] = 'Google+ URL';
return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods');
The above seems ideal for adding text input under the contact area of the profile.
I’m also curious how I can add a text area or checkboxes to a user’s profile? Additionally, is there a way to add tags from the blog as a field in the user profile?
Ideally, I’d have a field labeled “Specialties” or “Areas of Expertise” which would be blog tags. And when the tags are used on the front end, this particular user’s profile will show up among those results.
This is a great plugin that allows you to easily add custom fields to Users (among other things).
http://www.advancedcustomfields.com/
This tutorial will help you retrieve the values from user:
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-user/
I’ve seen a nice Tag auto-complete field in the plugin WordPress Admin Style, by Frank Bueltge (pretty essential to design admin pages). The list is hardcoded in JavaScript, we can use Ajax or
wp_localize_script
to get the real thing.It goes like this in the markup:
And the jQuery:
And, finally, make this field repeatable:
Arrange custom fields with drag and drop?
Adding Widget form fields dynamically