Wordpress Custom Registration Form

前端 未结 2 1898
半阙折子戏
半阙折子戏 2020-12-31 20:14

I have a client that needs a custom registration form.

  • I need to make a custom design on this page
  • I need to add custom fields like First Name, Compan
2条回答
  •  温柔的废话
    2020-12-31 20:21

    A custom WordPress registration form has two major advantages over the standard form. The first is the integration with the overall look and feel of the website theme. Standard forms often don’t work well with custom themes and there is always a chance that the custom CSS files do not render well with the form. A custom form, on the other hand, can be easily set up to work with custom CSS.

    The second and more popular reason of using a custom registration form is the option of custom fields that are not included on the standard form. A small custom registration form speeds up the process and collects all the necessary data from a neat interface.

    function wordpress_custom_registration_form( $first_name, $last_name, $username, $password, $email) {
        global $username, $password, $email, $first_name, $last_name;
       echo '
        
    First Name : Last Name: Username * Password * Email: *
    '; }

    This form can be inserted anywhere by using the shortcode [wp_registration_form]. Here is the code snippet for setting up the shortcode:

    function wp_custom_shortcode_registration() {
        ob_start();
        wordpress_custom_registration_form_function();
        return ob_get_clean();
    }
    

    I hope that by now you have a fair idea of creating a WordPress custom Registration form.Still any confusion kindly check Build Custom WordPress Registration Forms

提交回复
热议问题