WordPress

How to Add the WordPress Logout Link to Navigation Menu

Do you want to add the WordPress logout link to your website 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 at 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 log out 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 log out from the dashboard, but if the website administrator mistakenly hides the admin bar, you will not be able to log out.  Besides that when you have multiple user roles on 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 log out from the website.

WordPress Logout Link

The WordPress log-out link looks like this.

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

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

Adding the WordPress logout link to the navigation menu

From the dashboard go to Appearance > Menu.  From this menu option, you can control all the menu options available on 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 with this method is that it will show the logout menu on your website for all the users whether they logged in or not. But it will make sense only for the logged users.

Wrapping Up

Following the process, you will be able to add a WordPress logout link in your website navigation menu. You can see our other articles to learn How to allow guest users on WordPress

How to add front-end login page and widgets in WordPress

How to edit HTML in WordPress code editor

We hope this article will help you. If you like this article please like our Facebook Page to stay connected.

You Might Also Like