It is very common for users of Restrict Content Pro to want to add custom fields to the registration and profile forms so that members can enter and store additional information, perhaps for their location, profession, or personal interests (or anything else). I have shown how to add these kind of fields before, but the method is a bit out of date and not fully developed, so I’d like to walk through the process again so that you can easily add new fields to the registration form, the profile editor, and also the member edit screen in the admin section of Restrict Content Pro.

We will be adding the fields shown in the images below:

Step 1 – Add fields to the registration and profile forms

Adding fields to the registration and profile forms is simply a matter of writing a function that outputs the HTML for the fields and is connected to the proper actions. For the registration form, we need to use the rcp_after_password_registration_field action, and for the profile form we need to use the rcp_profile_editor_after action. Note, there are other action hooks you may use but these are the most likely ones you will want.

Our function is very simple:

We have simply setup the HTML and used get_user_meta() to retrieve the saved information for the currently logged-in user. If you put this code into your theme or an active plugin, the fields should now show up on the registration and profile forms. They won’t save any information yet, but they will show up.

Step 2 – Adding the Edit Member screen fields

Once we are finished, we want site admins to be able to edit the member details, just like they are able default user fields (name, email, etc). To do this, we need to add our new fields to the Edit Member screen in Restrict Content Pro. Adding the fields is nearly identical to adding them to the registration and profile forms. The only difference is the hook name we use and the structure of the HTML.

You should now have the Profession and Location fields showing up on Edit Member screen. Now it’s time to process and save the data during form submission.

Step 3 – Checking for errors during registration

In the case that we want to make our fields required (so they cannot be left blank during registration), we need to hook into the error checking process of Restrict Content Pro and determine if our custom fields validate. To do that, we can use the rcp_form_errors hook to determine if our fields have valid data entered in them. For this example, we’re simply going to assume that Profession and Location both need to be filled out, but we don’t really care what kind of information is entered in them. If you are adding a phone number field, for example, you would probably want to ensure the value entered matched a valid phone number.

The empty() function does exactly what it sounds like: it checks to see if the specified field is empty. If either field is empty, we call rcp_errors()->add() in order to register a new registration error. Restrict Content Pro will not allow the registration form to be submitted until all errors checks pass.

Step 4 – Saving the user fields on registration

Once we have confirmed that the custom user fields have proper information entered in them, we need to save the data to the member’s user meta. To do this, we use the rcp_form_processing hook and the update_user_meta() function:

This will store the entered value for both fields into the usermeta database so that we can retrieve it at anytime. Now it’s time to save data when submitting the profile form and also the edit member form.

Step 5 – Saving the user fields during member edit and profile edit

This process is identical to how we save the fields during user registration except the hook and the parameters passed to the hook are a little different, but everything else is exactly the same.

And that’s it! We now have fully functional custom registration fields that can also be edited by both site admins and member’s themselves from the profile editor.

Going further and adding more or different fields

All of the code provided in this tutorial is meant as an example. Since it is unlikely that these two fields will fit your exact needs, here are a few tips for how to modify it to fit your needs:

  • Fields are primarily identified by their name and id attributes. If you wish to change “profession” to “job”, search for “rcp_profession” and replace it with “rcp_job” (or add a second set of fields and then update the names/ids).
  • Field data submitted should be validated to ensure it matches the expected and desired format.
  • When adding additional fields, do not duplicate functions, instead duplicate existing code inside of the functions. This applies to all functions shown in this tutorial.
  • If you have problems, ask for help, I’m more than happy to assist!

You can view the complete example plugin here or you can download it as a zip file that is ready to be uploaded to your WordPress site as a plugin.

  1. Barbara Schendel

    This is EXACTLY what I was looking for. You are the best. Thank you!!!

    • Pippin

      I am not, sorry.

  2. Barbara Schendel

    Hi Pippin, This plugin is actually not working for me. I downloaded and installed the exact sample that you provided and it and while it does show the two new fields on the registration page, it still does not display them in back on the edit member (or edit user) page. Even tried deactivating all other plugins and switching to twentyfourteen. Any ideas?

    • Pippin

      Does it show everything correctly on the frontend?

    • Barbara Schendel

      The fields show up correctly on the front end, but not in the admin. Edit member screen just has all the usual info. I even tried the exact plugin you posted.
      All I need is one field, website_url. Here’s my modified plugin:

  3. Jon

    I followed the tutorial to integrate this with Jobify. This is the code:

    Goal #1: display extra fields. Achieved.
    Goal #2: display errors when fields are not filled in. Achieved.
    Goal #3: allow users/admins to edit their extra info in their profiles. Not achieved.

    Issue #1: On WordPress I go to Restrict > Members > Edit. Extra fields – Job Title, Company Name, Telephone, Address – appear, but they’re empty.
    Issue #2: logged in as a user I go to My Account > Edit Account. Extra fields – Job Title, Company Name, Telephone, Address – do NOT appear, therefore cannot be edited/updated.

    Any ideas?

    • Pippin

      Have those fields already been populated for the user that you are viewing?

    • Jon

      The user has filled in the details when registering. This suggests that they weren’t saved.

    • Pippin

      If you update a user after they have registered, do the fields get saved then?

  4. Jon

    I can only access user’s new fields through wp-admin as an administrator. I filled in the fields, clicked update, a little green note appears, saying that it’s been updated, but the fields are empty again. So, I assume that the data doesn’t get saved.

    • Pippin

      Could you paste your complete plugin code to and then share the link so I can look at it and test it?

    • Pippin

      Whoops, I missed that, sorry. I’m looking at it now.

    • Jon

      Woohoo! It works! Thanks!

    • Pippin


  5. Alastair Willey

    I’ve just updated from an old version of RCP to the latest version and have followed these instructions to update my custom fields from the old tutorial.

    I’ve managed to get it working on the signup form, but the fields are not appearing on the “Edit my profile” screen.

    Here is the code I’ve used

    Is there anything I’ve missed?

    • Pippin

      Which edit profile screen? The standard one provided by WordPress or the frontend version added by RCP?

  6. Alastair Willey

    Sorry the wordpress edit profile screen.

  7. Alastair Willey

    I didn’t realise there was a short code for front end profile details, maybe this wasn’t in the plugin when we first created the site.

    The short code works perfect so ignore the previous issue.

  8. Sky Resendez

    Hi PIppin,

    Is there a way we can export the information in these additional fields in addition to the basic information that’s included in the members CSV?

    • Rachel

      I’d love to know this too!

  9. Sky Resendez

    Hello Pippin,

    Our subscribers are getting errors to fill in the requested fields when renewing their subscription; however, because they have existing accounts, the normal registration fields don’t appear when upgrading/renewing their subscription, but the errors still appear, prompting them to fill in the fields:

    Can you point me in the right direction of how I can correct this?

    Thank you

    • Pippin

      As long as they log in before attempting to renew their subscription, it should work just fine. Since they are logged in, some of the fields will not be displayed as they are not needed.

    • Fredrik Hedelund

      We had the same problem. What you can do is to delete everything under the section: “Determines if there are problems with the registration data submitted”

      This means that the fields won’t be required, but at least people can start upgrading their membership again.

  10. Sky

    Hi again Pippin,

    Unfortunately I’m still having the same issue when our subscribers try to renew their subscriptions.

    As you can see here, when logged in, the fields do not display because they are not needed, as you mentioned earlier:

    After choosing a subscription level and filling in the credit card information, the subscriber will receive these errors (note: they’re still logged in):

    The only way for a subscriber to get past this hurdle is by deactivating the plugin and reactivating it after they have submitted their payment.

    I simply modified the fields area of the script that was posted up:

    Have you had any other reports of this issue?

    Thanks in advance for your help.

  11. Fredrik Hedelund

    Hi Pippin, and thanks for the great tutorial!

    I got one question though, The code works fine for actually creating the fields and also have them recorded in the database. However I can only see the data if actually visiting each members profile in wp-admin>Restrict>Members>Member Profile.

    How can I get the information to be displayed when viewing all members (in the members table)?

    • Pippin

      You will need to register a custom column and then call get_user_meta() to display it. Take a look at the members-page.php file in includes/admin/. It has some actions that you can use to add a new column.

    • Fredrik Hedelund

      Thanks for that info, I will go ahead and try to implement it.

    • Fredrik Hedelund

      I guess I just create two more columns in the member-page.php

      ID); ?>

      But is this the right way to call it?

    • Fredrik Hedelund

      php echo rcp_get_user_meta($member->ID)

    • Fredrik Hedelund

      php echo rcp_get_user_meta $member->ID

    • Fredrik Hedelund

      echo rcp_get_user_meta $member->ID

    • Pippin

      Sorry your comments got flagged as spam.

      Did that work out for you?

  12. Tim


    I’m struggling a lot with this. When members register, I want them to fill in extra information such as address, company name etc. That bit is fine.


    I want logged in members to be able to edit their own info – eg address, company name etc. As this does not appear on their membership profile page, this is an issue.

    How can I get round this?

    • Pippin

      That’s already supported with this sample code.

  13. Matt

    I’m trying to use this for the user’s country to help determine the correct shipping amount. I’ve used the most up to date code, but I need to figure out how to get it to update the EDD FES user country.

    Is there a tutorial for that?



    • Pippin

      Not that I know of, sorry.

  14. David Randulfe

    Can be posible add the fields only to Edit Profile shortcode ? I dont want on the registration form.


  15. Mike

    Thanks Pippin, the code works great!

    After burning a good bit of the day trying to use functions.php to run the custom fields code, I finally just set it up as a plugin.

    It will now be easy the next time I need to add custom fields to a registration form. I’ve used at least a half dozen membership plugins. Restrict Content Pro is the easiest to set up and run.

  16. Ciprian

    Hi Pippin!

    Great job with the plugin. I need to remove the first name, last name and username (optional) from the registration form. How can I do it?

  17. Jason Stewart

    Hi Pippin,

    I’m about to buy Restrict Content Pro but I have one important question first. I’m wanting to use custom fields like you describe in this post, but it’s important that my Admins be able to sort users based on the data.

    For example, if I add “State” as a custom field, and I have members type in their state during sign up, my Admins will need to be able to sort all members by state.

    What’s the best way to do this?

  18. Michael

    I am having an issue when i am in rcp-members edit members page via backend i can save data fine and data is echoed. However if a subscriber wants to edit/update custom fields via my edit-your-profile I can however my custom field don’t echo current data. It seems weird all works on backend but not on client edit-your-profile page can you update your example or suggest how to fix is it related to … get_the_author_meta or echo $current_user->user_state;

    <input name="rcp_state" id="rcp_state" type="text" value="”/>

    working file:

  19. mahmoud

    Thx veryyyyyy goood

  20. Ben Pearson

    Hi Pippin,

    Thanks for the article and all that you do.

    I just noticed a difference between the smaller gist in the article above and the complete example plugin gist that you link to at the end of the article.

    When adding the action “pw_rcp_add_user_fields”
    – you use the hook “rcp_after_password_registration_field” in the smaller gist
    – but then you have used the “rcp_before_subscription_form_fields” hook in the plugin example.

    Just thought you might like to know.

    Is there an up to date list of RCP hooks available?

  21. Peter Reid

    Hello Pippin, how do I add a dropdown list of countries ( or any other option) to the registration form? This a fairly standard option in a lot of registration forms. Thanks!

    • Pippin

      Peter, a drop down field works the same way as any other field, simply set up a select field with a name attribute and populate its options with the country names. See this page if you’re not familiar with creating select fields:

  22. Anke

    What about dropdowns for the custom fields? I’ve been trying to add a dropdown, which shows great but doesn’t get saved 🙁

    • Pippin

      Could you show me the code that you have tried? Please post it to and then share the link.

  23. sabeti

    Thank you for your plugin.
    How can I disable “choose a plan section” on registration form?

    Thank you

  24. Matthew Woodard

    Quick question: Is it possible to add a field such as “quantity” that would calculate against the subscription price?

    • Pippin

      It’s certainly possible but it will require quite a bit of additional development in order to affect the calculations of the subscription price.

      If you’d like to hire someone to help with it, we have a consultants page:

  25. Rodney

    Hello my friend, I have several days trying to find customized register forms, I think this yours is the ideal, my question is:
    How could add a new option in the pay section, always keep paypal, but add a field where the user just write a serial of numbers, maybe 8-12 numbers or signs, and after that the user get in with full member privilegies like the same did pay with paypal or credit card, is that can be possible?

    • Pippin


      I’ll be happy to help but could you please go ahead and open a support ticket so that we can verify your purchase? It’ll be easier to assist you there too.

  26. Mr Peter Reid

    Pippin, when I have modified the code for the registration form, do I add it to functions.php in my child theme? If not where exactly do I add it? Thanks

    • John Parris

      Hi Peter, the best way is in a custom plugin. If you’re not comfortable with creating a custom plugin, you can use Pluginception to make a custom plugin for you. Use it to create a new custom plugin, add the code, customize to your liking, and activate your new custom plugin.

    • Mr Peter Reid

      Thanks John. So you are saying I add an additional plugin which works along with Pippins Restrict Content Pro? It would be great if the registration form was more easily customized out of the box, as is the case with contact forms such as Contact Form 7.

  27. Mr Peter Reid

    Thanks to John Parris’s help I’ve managed to add the extra fields I needed to the registration form. I would be grateful for any guide to adding a dropdown list to two of the custom fields, (with the data being saved of course) Thanks!

  28. Andrew McCauley

    I haven’t found a way to export the custom user fields in the CSV file. Is there a way to do that?

    • Pippin


      That has to be added separately. We’re considering adding a way to make it automatic.

Leave a Reply

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match