WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I add a field to the WordPress Register form? For example, I want to add the "First Name" field in the users profile to the Register form, but I can't figure out how to do that.

The field's name is first_name, but adding <input type="text" name="first_name" id="first_name" value="<?php echo $_POST['first_name']; ?>" required="required" placeholder="<?php _e('First Name'); ?>" /> doesn't work for some reason. The form submits fine, but the profile doesn't get the "First Name" field filled in in the back end.

I'm editing this plugin to tweak the register form: http://wordpress.org/extend/plugins/s8-custom-login-and-registration/

share|improve this question

I don't know about the plugin you are using, but the way to add custom fields to the registration form and saving it to user profile is by hooking into register_form action hook to output the field and then using the appropriate filter/action hook to update/save user profile.

Your case, for example:

// output the form field
add_action('register_form', 'ad_register_fields');
function ad_register_fields() {
        <label for="firstname"><?php _e('First Name') ?><br />
        <input type="firstname" name="firstname" id="firstname" class="input" value="<?php echo esc_attr($_POST['firstname']); ?>" size="25" tabindex="20" />

// save new first name
add_filter('pre_user_first_name', 'ad_user_firstname');
function ad_user_firstname($firstname) {
    if (isset($_POST['firstname'])) {
        $firstname = $_POST['firstname'];
    return $firstname;
share|improve this answer
So this would add it to the default WordPress registration form, correct? – Rev Dec 13 '12 at 21:24
Yes, that is correct. – Ahmad M Dec 14 '12 at 8:37
@Ahmad M Is there any way to validation for these additional fields? – Vasanthan.R.P Apr 6 '13 at 5:08
up vote 0 down vote accepted

I found an excellent, free plugin that gets the job done.


Very easy to use, adds fields to both the register and the profile pages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.