Do you want to add a login form to your WordPress sidebar? A login form in the WordPress sidebar allows users to quickly login from anywhere on your website. In this article, we will show you how to easily add a custom login form to your WordPress sidebar.
When and Why Do You Need a Custom Login Form in WordPress?
Since, the sidebar appears throughout a website, it makes the login form more noticeable and easily accessible from every page on the site. Adding a login form to your WordPress sidebar makes it easy for users to quickly login to their accounts which boost engagement.
That being said, let’s take a look at how to easily add a login form in your WordPress sidebar.
Method 1: Adding a Login Form in Sidebar Using Sidebar Login Plugin
Upon activation, you need to go to Appearance » Widgets page in your WordPress admin area. Simply drag and drop the Sidebar Login widget in your sidebar widget area.
It will automatically add a login form in your WordPress sidebar. If you want to customize the login form settings, then you can edit the widget settings accordingly.
You can add logged-out title, custom links, enable lost password and register links, display Remember me option, and more.
Once you are satisfied with these settings, don’t forget to click on the Save button. After that, you can visit your website to see a custom login form in action.
Method 2: Adding a Custom Login Form Using WPForms Plugin
If you want to create a custom login form or registration form that has custom fields, and embed it in other areas of your website like sidebar, custom page, etc, then you need WPForms.
WPBeginner users can use the WPForms Coupon: SAVE20 to get 20% off on their purchase.
Upon activation, you need to visit WPForms » Settings page to enter your license key. You can get your license key from your WPForms account on their website.
After verification, you need to go to WPForms » Addons page. From here you need to scroll down to the User Registration Addon and click on the Install Addon button.
Once installed, you need to click on the Activate button to start using this addon.
You are now ready to create a custom WordPress login form. Simply visit WPForms » Add New page to launch the WPForms builder.
First, you need to enter a form name and then select the built-in User Login Form template.
It will display the login fields pre-loaded in your form. You can click on a field to edit it or add new fields from the left column.
After that, head over to Settings tab and click on the Confirmation section. This is where you need to define what to do once a user successfully login to your site.
The options include a message, a custom page, or a redirect URL to any page on your site. Ideally, you would want to redirect users to a page once they are logged in. This could be your homepage or any other page on your website.
Your login form is now ready. Next, you can add it in your WordPress sidebar.
Visit Appearance » Widgets page in your WordPress admin area. On this page, you need to drag and drop WPForms widget in sidebar widget area of your site.
You can add a title to display above the login form and select your form in the drop-down. Don’t forget to click on the Save button to store your widget settings.
You can also use WPForms to create a custom user registration form with anti-spam features.
If you want to embed the custom login form on a post or page, then you can do so by using the WPForms shortcode.
We hope this article helped you learn how to add a login form in your WordPress sidebar. You may also want to see our step by step guide on how to create a WordPress login popup modal which will allow users to login without leaving the page they are viewing.