How to make a log out menu on the WordPress navigation menu. If you run a membership site or membership on WordPress, adding a Log Out or Exit menu to the front end will make your users feel easier and make your site much more user friendly. But what we know is that the menu is only on the back end. Then how do you create a Log Out menu on the WordPress navigation menu …?
In this article, I will create a simple article on how to create a Log Out menu to be displayed on the WordPress navigation menu on the front end so that the Log Out menu is easily accessible to users of your WordPress site.
Creating a Logout Menu in the WordPress Navigation Menu
Basically, WordPress provides a Log Out menu in the WordPress admin area which is located in the upper right corner under your profile name.
To see it, please hover your mouse over your username, and the “Log Out” link menu will appear in the bottom dropdown menu under the “Edit My Profile” link.
WordPress has a logout link like the following:
And to create a Log Out menu on the front end, you can use the link above to serve as a navigation menu to make it easier for your member users to access the Log Out menu directly from any page on your site.
To do this, please enter the Appearance »Menus menu in your WordPress admin. After that, you need to click on the “Custom Link” tab and please enter the URL for the “Log Out” menu above and don’t forget to name the menu as “Log Out” or “Log Out”. Also please replace the example of your domain URL with your own domain name.
When finished, click the ‘Add to menu’ button, and you will see the new link menu moved to the right column. You can adjust its position just by dragging it up or down to your desired position.
Don’t forget to click the “Save Menu” button to save the new menu you added.
You can now visit your website to see the “Log Out” menu has now been added to your navigation menu.
The Log Out menu is already installed, but there are other things you need to do because the Log Out menu can be seen by users who are not currently logged in. The Log Out menu should only appear when the user is logged in. To make the Log Out menu only visible to logged in users, you can read my previous article here ⇒ How to display a different menu when a user logs in on WordPress.
Add WordPress Logout Link in Sidebar Widget
The next way is to use the WordPress widget, by default WordPress has a widget called “Meta Widget”. This widget shows a set of useful links including a Log Out link or a login to a user.
But most users don’t like using this widget because there are several other menu links in the Meta widget which are not very useful and look not good when installed.
Alternatively, if you want to put the Log Out menu on the sidebar of your WordPress site, you can add a new widget called “Widget Text” and then post the Log Out link below in the text widget area.
<a href="http://domainanda.com/wp-login.php?action=logout">Log Out</a>
Don’t forget to put the HTML Code link as above in “Text” mode in the Widget Text sidebar.
And there are two ways you can do to create a Log Out menu to display on the navigation menu on the front end of WordPress. Hopefully this article is useful and good luck. 🙂