You want users to register for an account on your website? And they must fill out additional information in their profile? But you don’t know how to create a user registration and user profile forms. Then use the MB User Profile plugin.

What is MB User Profile?

MB User Profile is a WordPress plugin to help you create the user registration and user profile forms quickly and conveniently. The plugin lets you can create as many user forms as you want and add custom fields to them. It supports all kinds of custom fields, such as text, select, image upload and has lots of options for you to customize. With MB User Profile, it takes you only 5 minutes to create a custom form for user profile as expected!

Here is a screenshot of the user profile page using MB User Profile:

wordpress user registration & user profile form
User Profile Form Edit

 

As you can see, in addition to the default information that WordPress offers, there are more custom fields in the Additional information section such as phone number. If you are using your website to connect to people, then you may need more information like personal Facebook URL, age or address. This information will help you understand your users and serve them better.

How to create a user profile form

To create a user profile form, create one custom meta box using the Meta Box plugin. You need to declare the custom fields that you will use for the user profile form. See this documentation for more details.

Here is a meta box I created for the phone number above:

add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
    $meta_boxes[] = [
        'title' => 'Other Information',
        'id' => 'other-info',
        'type' => 'user',
        'fields' => [
            [
                'id' => 'phone',
                'type' => 'text',
                'name' => 'Phone Number',
            ],
        ],
    ];
    return $meta_boxes;
} );

Copy the code above into your theme’s functions.php file. In this code, note that the type is set to user. This is needed to tell the Meta Box that it is a custom meta box for users, not for posts.

Now let’s edit any page and insert shortcode as follows:

[mb_user_profile_info id="other-info"]

Then visit that page, you will see the user profile form is displayed as shown above. Very simple, right?

If you want to add more custom fields to the form, see this guide. And if you want to customize the form as you wish, see to this guide.

Create user registration form

If you want to create a registration form, the plugin MB User Profile can also help you. It has a shortcode that you can insert the user registration form anywhere you want – in a page content or in a sidebar:

[mb_user_profile_register]

If you want users to enter additional information upon registration, create one meta box contains those custom fields and insert it into the shortcode above. For more details, please look at this documentation.

Are you ready?

Do you see how simple the creation of user profile forms is? With a little code, you can create a user profile form as desired. If you have a website that requires members to register, try MB User Profile now. You will find how simple and flexible it is.

Which method are you using to let users register and edit their information? Let me know in the comments.


Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.