What's WP
Find Everything Related to WordPress - Best Tutoriasl on WordPress!
How to Add Frontend Login in WordPress

How to Add Frontend Login in WordPress

Allowing frontend login is a great idea for those WordPress sites with a number of users who have to log in before taking certain actions but do not need the access to the admin area. This not only makes it easier for user management, but also delivers a better user experience by eliminating users’ confusion and enabling them to stay where they are after logged in.

There are two ways you can take to add frontend login in WordPress. One is to create a custom login page with code, and another is to make use of a plugin. Our suggestion for normal WordPress users is the latter method because plugins are functional while easy-to-manage. Unless you are experienced enough to completely understand and control the coding stuff, we will not recommend dealing with code.

Among those available plugins, we suggest Theme My Login most as this one is fully compatible with the last versions of WordPress, and offers a simple way for customization. In below, we will explain in detail how to use the plugin to add a frontend login page or widget.

Add a Frontend Login Page in WordPress

As the plugin is easy-to-use, adding a basic login page can be done within one minute. However, we’d suggest you take some more time to make some customizations to better fit your and the users’ needs.

Step 1: Get the plugin working

First of all, you have to install the plugin and activate it. After the activation, you will find a menu item named “TML” is added to the sidebar menu of your dashboard. This is where you can configure the plugin settings later.

Now, go to “Pages”. If you are careful enough, you may have found that several new pages have been created and published by the plugin automatically. These pages include Log In, Log Out, Lost Password, Reset Password, and Register. You can view the pages individually to see whether they function in the way you want.


The pre-made pages come with the basic forms and links that are commonly used. If you only want something simple and basic, you can stop here. But in the case that you have some other needs, you can also dig further to the plugin settings and modules.

Step 2: Change the general settings

The settings of the plugin can be changed within the “TML” menu item. Entering the settings page, you will see two options first which are “Stylesheet” and “Login Type”. For the former, you’d better check to store the stylesheet in your theme directory so that your customizations will stay safe in upgrades. But if you have trouble displaying the forms, you can try disabling this option.

And for the “Login Type”, you can make a free selection among the following three options.

  • Login with username only.
  • Login with email only, which means users are required to log into your site with their email addresses.
  • Login with either username or email.

General Settings

Add a Frontend Login Widget in WordPress

Besides the login page, the plugin allows you to add a login widget in the sidebar of your site so that users can log in easily without leaving their current page. This can be done quickly by following the steps below.

  1. Go to “Appearance” > “Widgets”.
  2. Find the widget named Theme My Login, and drag it to any widgetized area.
  3. Select a default action, select the links you want to show in the widget, and decide the gravatar size. The destination of the links should be changed through the “Custom User Links” module which will be discussed later.
  4. Click on the “Save” button.

Add a Frontend Login Widget

Then you can visit your site and see whether the login form and logout links are displayed properly in the sidebar.

Sidebar Login Widget

Make Use of the Modules

Theme My Login comes with several modules which help customize and enrich the frontend login. You can enable them based on your needs. Note that each module includes some simple settings to deal with.

  • Custom Email. This option enables you to customize the email sent to new users upon registration. You can use a custom “from name”, “from email”, select an email format, and add your own subject and content.
  • Custom Passwords. With the default login form, new users receive an email asking them to set up a password after filling out the form. However, with this module enabled, a password field is added to the login form so that users can enter a password when they register.
  • Custom Redirection. This allows you to set up login and logout redirects based on user role. You can choose to redirect users back to the page they were on before logging in, or send them to anywhere else on your site.
  • Custom User Links. This is where you can add the links that you want to show in the login widget.
  • reCAPTCHA. This enables you to set up reCAPTCHA for the login form to prevent spam registration.
  • Security. With this module enabled, you can make your WordPress site private for logged-in users only, enable private login, and limit the login attempts.
  • Themed Profiles. This module comes with the ability to allow your users to manage their profiles from the frontend.
  • User Moderation. You can enable email confirmation or choose to approve all new registrations manually.

Theme My Login Modules


Joyce is a professional writer & SEOer who loves trying new things and sharing the experience through blogging. She loves clean design, playing with different WordPress themes, SEO, etc. Very often, you could find her in various WordPress event as invited speakers.