How to Easily Add a WordPress Logout Link to Your Navigation Menu

Have you ever been working on a website, finish up, and realize you can’t find the logout button? Normally this is just a minor headache while you figure out where the developer has hidden it, but for many users this can be a frustration. This can be even worse if you are working on public computer that you don’t want to stay logged in on. Having a clearly marked exit isn’t just for buildings, it also helps your site’s organization. Today, let’s take a quick look at how to easily add a WordPress Logout Link to your Navigation Menu.

Why am I Adding a Logout Link Again?

You may be asking yourself, “Why would I need to add a Logout Link when I can Logout from the Admin Bar?” It’s true that usually you can logout of WordPress by finding the Logout Link under your profile in the upper right hand corner of the Administration Dashboard.

Sometimes, however, you may have multiple users on the same site and need to disable the WordPress admin bar, or not have logged-in users see your dashboard at all. During these situations, you and your users will probably still want to be able to logout. Fortunately, you can easily add your Logout Link elsewhere.

What is a WordPress Logout Link?

For WordPress, your Logout Link is pretty simple. It will look something very close to the below, but make sure you replace “example” with your websites domain.

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

Save your Logout Link once you’ve replaced “example”, because this what you can add anywhere to your WordPress site.

Create a Custom Link in the Appearance > Menu

From the Dashboard go to Appearance and then select Menu. This will open the Menu window where you control any menus you have on your site.

Select the menu you would like to add the Logout feature too. I recommend one you have on the main page. Next, select “Custom Link” and add your Logout Link to the URL box and Logout in the Link Text. Double Check your work and click “Add to Menu” and don’t forget to select “Save Menu”. If you would like to change its location on the Menu you can drag and drop it on the link to where you would like it.

Fair warning, the problem with this method is that “Logout” will now be visible to everyone who views the site whether they are logged in or not. You can fix that by showing users different menus for whether they are logged in or not. (Stay tuned for a future tutorial on that one.)

It’s that Easy to Add a Logout Link in you Navigation Bar

Congratulations! You’ve now added a WordPress Logout Link to your Menu! Do you have your won methods or location you like to keep your Logout Link? Be sure to share in the comments below and let us know what works for you.

Create a custom logout link for your membership sites in just a couple easy steps!Click To Tweet