Here’s the easiest way to add a login button to your menu navigation in wordpress. It requires absolutely no coding and is simple to create.
Do you want to add a login button to your menu bar like this one that someone can click and it takes them to the login page where they can enter their details and log in?
Well, in this tutorial I am going to show you how to add a login button to your menu in WordPress with absolutely no coding required: no PHP, no CSS, no HTML, none of that sort of stuff.
So the first thing you need to do is to log in to the backend of your WordPress website. To do that go to yourwebsite.com/wp-admin but replace yourwebsite.com with your actual website address. So for me it is my.melee.co/wp-admin and log in and that will bring you to the dashboard. You now need to install the plugin theme MY Login which has a lot of functionality. But the one that we want is the ability to create that login button.
To add the plugin simply go to plugins on the left-hand side and click on add new. Then type theme My Login into the search bar and click enter. Simply find the theme My Login plugin, click the install now button and once it is installed you can go ahead and click to activate it. You now need to add your login page to your menu. And to do that simply go to appearance and menus. You can choose the menus that you want to edit or you can go ahead and create a new menu if you wish. We want to look at the pages and we want to find the login page under the most recent section. So we can see login here, tick it and then click add to menu. We can see that the login page has now been created so let us go ahead and save that menu.
The next step is to activate the menu if it is not activated already. And to do that go to appearance and down to customize. And this will look a little bit different for every theme but you want to find the menu section. You want to find the menu location and you can then put in the menu that you were just editing. I am going to put it into the primary navigation. You can put it into the secondary navigation or whatever is available for you. Once you have done that, go ahead and click save and publish. Now if I go to my website I can see that the login actually does not exist here and that is one of the awesome things about this plugin.
It is only going to show your login button to logged out users, so people who are not logged in to your website. So let us go ahead and log out. So I am logged out and I can see the login button here. So if I was to click it, it would then take me into the login page which is here where I can go ahead, enter my username and password and log in.
You can also customize your login page so you can add text to that. You can even allow people to log in with their email address. To do that go to pages, all pages, and then you want to go ahead and find your login page and edit it. I can see my page has this short code and that is where the login fields get generated so I am just going to add some text above that to let them know that they are not logged in and that they can register here. I will then go ahead and click update so we can see the text that I just added here now on the login page.
You can also allow people to log in using their username only, email only, or username or email. To do that just go to the TML section on the side here and you can choose what you want. I want people to be able to log in with their username or email address. You can also change a couple of settings here. I will go ahead and click save changes. So I can see now that people can log in using their username or their email address. If you want to change the page that people go to after they log in then I suggest the plugin Peter’s Login Redirect where you can adjust that in there.
And that completes this lesson How to Add a Login Button to Your Menu in WordPress. If you have any questions or if you want to get access to the transcription, go to pelt.co/14 and I also did an episode How to Add a Logout Button to Your Menu in WordPress which you can check out. Go to pelt.co/13 to see that video.
Thanks for watching guys and do not forget if this helped you please give us a thumbs up and subscribe because that really helps our channel and we really appreciate it.