Custom login form for WordPress

How to create custom login form for your WordPress site where (optionally) only specific user roles are allowed to login.

This article explains how to setup and configure your custom Login form for WordPress. In most use cases a login form will work in combination with a registration and lost password form so you might also be interested on how setup a Registration form and or Lost password form.

Creating a custom WordPress login form

First edit your form and navigate to Form Settings > Register & Login. From the Actions option choose Login (user will be logged in). Now when the form is being submitted it will try to login the user.

Enabling the form to act as a login form for your WordPress site.
Enabling the form to act as a login form for your WordPress site.

Allowing only specific user roles to login to your WordPress site

Now select the roles that should be allowed to login, or leave black to allow all roles.

Allowing only specific user roles to login to your WordPress site.
Allowing only specific user roles to login to your WordPress site.

Defining the login page URL

Defining the login page URL for your WordPress site.
Defining the login page URL for your WordPress site.

Verification of E-mail address

If your registration form is configured to send a verification E-mail after registering a new account, you will want to make sure you add the Verification Code element to your Login form.

Adding the "Verification Code" element to allow registered users to verify and activate their account on your WordPress website.
Adding the "Verification Code" element to allow registered users to verify and activate their account on your WordPress website.

Whenever the user clicks the verification link inside the E-mail, they will be redirected to the defined login page where they can enter the verification code to activate their account. As shown below.

Login form for WordPress with verification code to verify their E-mail address was valid.
Login form for WordPress with verification code to verify their E-mail address was valid.

Last updated