The WordPress user profile allow you to set values for social services that you want to use. But it can often be some of the actual services such as facebook, twitter or googlepus are not included in the user profile. Adding profile form fields can be done with a code, no plugin required. Create a function which will accept an array of profile keys and values:
function modify_contact_methods($profile_fields) { // Add new fields $profile_fields['facebook'] = 'Facebook URL'; $profile_fields['facebook'] = 'Facebook URL'; $profile_fields['googleplus'] = 'Google+ URL'; return $profile_fields; } add_filter('user_contactmethods', 'modify_contact_methods');
Put this function in Theme Functions (functions.php) on the main theme or child theme and you will get the required fields in your profile form.
One thought on “Add Profile Fields to WordPress User Form with Code”