When you are running a WordPress site with multiple users who are required to log in, adding a login page on the frontend of WordPress or in the widget area will certainly make it easier for your users when they want to log into their Dashboard page. This not only makes user management easier, but also provides a better user experience.
There are two ways you can add a login on the frontend of WordPress. One way is to create a custom login page with code, and another way of course by using plugins. In this article, of course, I will provide the easiest way, namely by using the help of a plugin to add a login page on the frontend of WordPress.
The plugin I will be using in this tutorial is Theme My Login, this plugin is fully compatible with the latest version of WordPress, and offers a simple way of customization. Below, I will explain in detail how to use a plugin to add a frontend login page or in the widget area.
How to add a login on the WordPress frontend page
To use plugins My Login Theme the first thing you have to do is install the plugin and activate it. Upon activation, you will find a new menu item in the sidebar of your dashboard named “TML”. It is in this menu that you can configure plugin settings.
Now, please go to the Pages menu. In the page list page menu you will find that some new pages have been created and published by the TML plugin automatically. This page includes Log In, Log Out, Forgot Password, Reset Password, and Register. You can view individual pages to see if they work the way you want them to.
The page that has been created automatically is still the basic form and commonly used link. If you want a simple and basic look, you don’t need to do any more setup. But you can also dig further into plugin and module settings.
You can adjust plugin settings as needed in the “TML” menu. Entering the “General” settings page, you will see two options namely “Stylesheet” and “Login Type”. For Stylesheets, it is better if you check to save the stylesheet in your WordPress theme directory so that if you do customization it will be safe when an upgrade occurs. But if you have trouble displaying the form, you can disable this option.
And for “Login Type”, you can make a free choice between the following three options.
- Enter with your Username only.
- Login with Email only, which means users are required to log in to your site with their email address.
- Log in with your username or email.
How to Add Login Frontend on WordPress Widgets
Apart from creating a login page, this plugin also allows you to add a login in the widget area on the sidebar of your site so that users can log in easily. This can be done quickly by following the steps below.
- Enter the menu Appearance »Widget
- Find the named widget My Login Theme, and drag it to the widgetized area.
- Choose Default Action, and choose the link you want to show on the widget, and specify the gravatar size. The link destination must be changed via the “Custom User Links” in the module.
- Click on the “Save” button.
Then you can visit your site and see if the login and logout forms are properly displayed in the sidebar.
Use of Modules
The My Login Theme plugin comes with several modules that help customize and enrich the frontend login features. You can enable them based on your needs. Note that each module includes some simple settings to handle.
Custom Email : This option allows you to customize the email sent to new users after registration. You can use a custom username or email, choose an email format, and add the subject and body of the email.
Custom Password : With the default login form, new users receive an email asking them to create a password after filling out the form. However, with this module activated, a password form is added to the login form so that users can enter a password when they register.
Custom Redirection : This allows you to set login and logout redirects based on user role. You can choose to redirect users back to their page before signing in, or send them elsewhere on your site.
Custom User Link : This is where you can add the links you want to appear in the login widget.
reCAPTCHA : This allows you to set a reCAPTCHA for the login form to prevent spam registrations.
Security : With this module enabled, you can make your WordPress site private for user logins only, enable private logins, and limit login attempts.
Themed Profiles : This module comes with the ability to allow users to manage their profile from the frontend.
User Moderation : You can enable email confirmation or choose to manually accept all new registrations.