WordPress

How to Add the WordPress Logout Link to Navigation Menu

It’s very disturbing when you don’t find any legit option for your website, especially when you work on a public computer. Besides if you run an eCommerce shop, membership site or management system then a logout link is very essential for your users.

So here in this article let’s take a look how you can add your logout link to your WordPress navigation menu.

Why add a logout link?

Normally in a WordPress website we can easily logout from the admin bar in the top right corner.  We will find the logout option under our profile. 

So why do we need a logout link? It’s very easy to logout from the dashboard but if the website administrator mistakenly hides the admin bar then you will not be able to logout.  Besides that when you have multiple user roles in your website then you need to hide the admin bar and there are also many reasons you have to hide the admin bar. So if you add your logout to the navigation bar then without the admin bar you can easily logout from the website.

WordPress Logout Link

The WordPress logout link looks like this.

http://example.com/wp-login.php?action=logout

You need to replace the “example.com” to your domain name. Save your link you need to add this link into your WordPress website. This link directly accesses you to logout from the WordPress session. When you visit your logout link it will show you  a message if you really want to logout just click on the logout option and you will be logged out from the website.

Adding the WordPress logout link to navigation menu

From the dashboard go to Appearance > Menu.  From this menu option you can control all the menu options available in your website.

From the menu list select the menu where you want to add this logout link. Then click on the custom link fields and add your WordPress logout link and link text as Logout. Check everything again and click on the add menu button. Don’t forget to save your menu.

The only problem in this method is that it will show  the logout menu in your website for all the users whether they logged in or not. But it will make sense only for the logged users.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *