Do you want to easily embed a login form on your WordPress site? Having an embedded login form on your website boosts security and provides a better user experience. Even if you know nothing about coding, you can embed a beautiful login form in minutes!
In this tutorial, we’ll show you how to embed a login form on your WordPress site.
What Is a Login Form?
A login form lets users sign in to your website using their username and password, so they can access content that’s hidden from regular visitors.
Using WPForms, you can easily create a custom login form in WordPress. With WPForms you can:
- Add, delete, or change any of the form fields using the drag & drop features
- Embed a login form on posts, pages, even the sidebar widget area
- Create a link to the user registration form for your site so people can sign up easily
- Allow users to reset their passwords by including a link on the form
- Auto-fill your users’ names and email addresses to improve your user’s experience
Custom login forms are just one of many types of WordPress forms you can create.
Why Embed a Login Form on Your WordPress Site?
As a WordPress site owner, you want to keep your website secure, improve your user’s experience, and keep the same look of your brand.
So why not try embedding a login form on your WordPress site? Using a login form is a great idea for lots of reasons that include:
- Boosting User Engagement: You can embed a login form on a special page making it more convenient for users. But, that’s not all, you can use that page to make them aware of special sales, notices, and more.
- Improve Your Branding: Your users will feel more at ease when the login page looks like the other pages on your WordPress website. By creating a custom login form on WordPress, your site will look more professional and build user trust.
- Add a Layer of Security: You can use several types of security measures on your login page to reduce spam and prevent brute force attacks to your site. You can even change your WordPress login page.
How to Embed a Login Form on Your WordPress Site
Are you asking yourself how do I embed a login form on your WordPress site? Here is a step-by-step tutorial that shows you how.
Step 1: Embed a Login Form on WordPress
Using WPForms is the easiest way to embed a login form on your WordPress site. WPForms Pro has a tremendous variety of pre-built templates for every type of niche, business, and industry, including tons of different online form templates.
The first thing you’ll want to do is install and activate the WPForms plugin. For more details, check out this step-by-step guide on how to install a plugin on WordPress.
Next, you must install and activate the Form Templates Pack addon.
To do this, go to WPForms » Addon and find the one labeled User Registration Addon.
Click on Install Addon
Now that the plugin is active, you must create a new form.
To do this, go to WPForms » Add New and name your form. Then, scroll down to the section labeled Additional Templates and type User Login Form in the search bar. Then, choose the Create a User Login Form.
Once the pre-made form template loads, most of the work is done for you, the username and password fields are already on the form.
If you’d like, you can add additional fields to your form by dragging them from the left-hand panel to the right-hand panel.
Then, click on the field to make changes. You can also click on a form field and drag it to rearrange the order on your login form.
When your form looks the way you want it, click Save.
Step 2: Configure Your Form Settings
To start, go to Settings » General.
Here you can configure:
- Form Name: Rename your form here if you choose to.
- Form Description: Place some information in this field to describe the form.
- Submit Button Text: Customize the copy on the submit button. In our example, we’ll change our submit button to say “Sign Me Up!”
- Spam Prevention — Stop contact form spam with the anti-spam feature or Google reCAPTCHA. The anti-spam checkbox will be automatically checked on all forms you create in WPForms.
- AJAX Forms — Enable AJAX settings with no page reload.
- GDPR Enhancements — You can disable the storing of entry information and user details, such as IP addresses and user agents, in an effort to comply with GDPR requirements. In addition, check out our step-by-step instructions on how to add a GDPR agreement field to your simple contact form.
When you’re done, click Save.
Step 3: Configure Your Form Notifications
The notifications feature is off by default since getting an email each time someone logs in may fill your email inbox up quickly. But, if you would like to send out an email when someone logs in, its easy to set up. To learn more about this feature, see our documentation on setting up notifications.
If you want to keep the branding of your emails consistent, you can check out this guide on adding a custom header to your email template.
Step 4: Configure Your Form Confirmations
Form confirmations are messages that display to users once they’ve logged in to your website.
WPForms has 3 confirmation types to choose from:
- Message: This is the default confirmation type in WPForms. When a user logs in, a simple message will appear welcoming them to your site, informing them of the next step they need to make, or offering an incentive. Check out some great success messages to help boost user happiness.
- Show Page: This confirmation type will take your users to a specific web page on your site, like a landing page, sales page, or any other page on your WordPress website. You can check out our handy tutorial on redirecting customers to a “Thank You” page. While you’re at it, be sure to check out our article on creating effective Thank You pages.
- Go to URL (Redirect): This option is for when you want to send site visitors to a specific page on a different website.
Now, let’s see how to set up a simple form confirmation in WPForms so you can customize the message visitor to your site see when they log in using your embedded form.
To start, click on the Confirmation tab in the Form Editor under Settings.
Then, customize the confirmation message to your liking. We added some text in our form to give you an idea.
Once you’re done, click Save. For help with other confirmation types, see our documentation on setting up form confirmations.
Now, you’re ready to add your login form to your WordPress site.
Step 5: Add Your Login Form to Your WordPress Site
Once you’ve built your login form, you need to add it to your WordPress website. WPForms allows you to add your forms in various locations, including your blog posts, pages, and even sidebar widgets.
To begin, create a new page or post on WordPress, or use an existing one.
After that, click inside the first block (the blank area below your page title) and click on the Add WPForms icon.
The handy WPForms widget will appear inside your block. Click on the WPForms drop-down and pick the login form you want to embed into your page.
Now, publish your post or page, so your login form appears on your website.
Create a WordPress Login Widget
Want to make a WordPress login Widget? WPForms makes it super easy to embed your login form in a widget. Just add the widget to your sidebar. Then, type in a name for your form in the “Title” box.
Next, select the login form you wish to embed. Now, click Done to save your changes.
Go to your site and refresh the page, and you’ll see your login form embedded in the widget area sidebar.
And there it is! You now know exactly how to embed a login form on your WordPress site. Be sure to check out our post on the user registration and login forms for WordPress which you can embed on your site as well
So what are you waiting for? Get started with the most powerful WordPress forms plugin today. WPForms Pro includes a free login form that you can embed on your WordPress site and offers a 14-day money-back guarantee.