Adding more fields to the registration form


Am using Jupiter theme.

The registration has by default username and password fields.

The view for it is defined as below:

<?php if (get_option('users_can_register')) {?>
            <div id="mk-register-panel">
                    <div class="mk-login-title"><?php _e("Create Account", 'mk_framework');?></div>

                    <form id="register_form" name="login_form" method="post" class="mk-form-regsiter" action="<?php echo site_url('wp-login.php?action=register', 'login_post')?>">
                        <span class="form-section">
                            <label for="log"><?php _e('Username', 'mk_framework');?></label>
                            <input type="text" id="reg-username" name="user_login" class="text-input">
                        <span class="form-section">
                            <label for="user_email"><?php _e('Your email', 'mk_framework');?></label>
                            <input type="text" id="reg-email" name="user_email" class="text-input">
                        <span class="form-section">
                            <input type="submit" id="signup" name="submit" class="accent-bg-color button" value="<?php _e("Create Account", 'mk_framework');?>">
<?php do_action('register_form');?>
                        <input type="hidden" name="user-cookie" value="1" />
                        <input type="hidden" name="redirect_to" value="<?php echo $current_url;?>?register=true" />
                        <div class="register-login-links">
                            <a class="mk-return-login" href="#"><?php _e("Already have an account?", 'mk_framework');?></a>
<?php }?> 

I wanted to have the firstname, lastname and password to be included in the registration.

Am new to WordPress development.
Trying to figure things out.

Can anyone please explain how this works.


, , Noor M 5 years 2018-08-31T02:04:51-05:00 0 Answers 82 views 0

Leave an answer