Including extra person profile fields within the WordPress registry
Would you like to be able to add new profile fields when users register on your WordPress site?
You might want to allow users to submit their social media profiles. Or you would like them to provide their business phone number when registering. This can all be done by adding additional profile fields.
In this article, we will show how to add additional user profile fields to the WordPress registry.
Method 1. Add custom user profile fields using the advanced custom fields plugin
The best way to add additional user profile fields in WordPress is to use the advanced custom fields plugin.
First, you need to install and activate the "Advanced Custom Fields" plugin. For more information, see our step-by-step guide on installing a WordPress plugin.
After you've installed and activated it, go to Custom Fields »Add New and give your new field a name.
We'll call this example "Twitter Handle" because we're setting up a custom field to add a Twitter username. However, you can name it anything you want.
Then click the "Add Field" button. It will open to configure your new field. Here is our example of customization.
The field label is the name of your field that you can use to organize your fields.
The "Field Name" will be filled in automatically based on the name you give your field. However, you can change it as you wish.
Under "Field type" you can choose what kind of information you want to transmit.
You can choose many options like email, number, text area, url, password and more.
The "Required?" Can be turned on or off. If you want someone who registers to fill out this field, you must toggle the required button to "Yes".
Lastly, the placeholder text is inserted into the field to give your users an example when they register. We used "@sample_username".
The next step is to determine the location for this profile field.
You'll need to scroll down to the "Location" section and make sure you select "User Role" from the drop-down menu.
On the far right, the "Everyone" option simply means all users who register.
However, if you only want to apply this rule to specific user roles such as administrator, editor, author, contributor or subscriber, you can make this selection there.
Then scroll down to the settings panel. Make sure the Active field is set to Yes, then click Publish in the upper right corner to save this field.
In the "Style" section, make sure you select "Seamless (No Metabox)" to prevent the name of this field from appearing on your registration page.
Since we've already given instructions on how to send the Twitter handle, you don't want it to appear in the field multiple times as it makes it look cluttered.
Lastly, you can see all of your fields by going to Custom Fields »Field Groups.
Now it's time to check out how this shows up on your registration page. The standard URL for registration is at "yoursite.com/wp-login.php?action=register".
Our example looks like this:
If you want to create a custom user registration form in WordPress, you can do so using the WPForms plugin and follow our tutorial on creating a custom user registration form in WordPress.
Method 2. Add additional user profile fields with additional profile fields
With this method, you can easily add additional fields to user profiles and user registration forms in WordPress. It's a little less flexible, but it gets the job done.
First, you need to install and activate the Profile Extra Fields plugin. If you're not sure how to do this, check out our full guide on how to install a WordPress plugin.
Once the plugin is activated, you will need to create some additional user profile fields that you can use in your registration forms.
We're going to create a phone number field as an example, but you can create as many of these fields as you want.
Go to yours first Profile additional fields »Add new Page. We're creating a field for users to enter their phone number.
You will see that we named the field “Phone Number” and selected “Phone Number” from the drop down menu.
In the field properties we activate all the check boxes for the "Author" user level, since this field should be displayed when someone registers as an author.
Finally, check the box to fill in the required field if you want the phone number to be provided during registration.
Scroll down until you see:
Make sure the box is checked so that the field appears on your registration form. Don't forget to click the "Save Changes" button below before continuing.
If you create these fields, you'll be able to see them when you go to yours Profile additional fields »Add new Page:
Now you want to go to your WordPress dashboard to change some settings for new registrations.
Go to Settings »General Page in your WordPress admin area and check the box for membership so anyone can register.
You need to make sure that the default role is set to the role for which you added additional fields.
This allows you to control the level of access that new users have. This will force the registration form to display the fields previously selected in this tutorial.
This is what the standard registration form looks like:
Pro tip: You can always create a custom WordPress user registration form by following our tutorial.
We're using "AuthorJon" as a test profile to show you how this new user registration will appear in the dashboard.
To see the additional fields in action, go to User »All users Then click on "Edit" to display the profile you want.
Let's look at the user we just created, AuthorJon. If you scroll down to the bottom of their profile you will see:
As you can see, their phone number was created on their profile when they registered their account. This also applies to any other fields that you want to use.
We hope this tutorial has helped you to add additional user profile fields to the WordPress registry. You might also want to check out our guide on creating a custom WordPress login page and our comparison of the best WordPress membership plugins for creating and selling courses.
If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.