Would you like to add a WordPress unsubscribe link to your site?
If you run a membership site, bbPress forum, e-commerce shop or learning management system (LMS) with WordPress, it is helpful for your users to have a prominent unsubscribe link.
In this article, we’re going to show you how to add the WordPress opt-out link to your navigation menu as well as other areas of your website.
The logout link for WordPress
Usually, you can log out of your WordPress site by clicking the unsubscribe link. This link is located under your profile picture in the upper right corner of the WordPress admin bar.
All you have to do is hover your mouse over your username and it will appear in the drop-down menu.
If you or your site administrator has disabled the WordPress admin bar, the WordPress unsubscribe link will not appear.
The good thing is that you can directly access the WordPress opt-out link to log out of your current WordPress session.
The unsubscribe link for your WordPress site looks like this:
Don’t forget to replace example.com with your own domain name.
You can access this link directly in your browser window to log out of your WordPress site.
Visiting the WordPress unsubscribe link will take you to a warning page. You will need to click the unsubscribe link to confirm that you really want to unsubscribe.
You can also manually add this unsubscribe link anywhere on your WordPress site. Let’s see how to do that.
Subscribe to WPBeginner
If you don’t like the video or need further instructions, read on.
Adding the unsubscribe link in WordPress navigation menus
By adding the WordPress unsubscribe link to your website’s navigation menu, you can easily access it from any page on your website.
Just go to the Appearance »Menus Page in your WordPress administrator. After that, you need to click on the Custom Links tab to expand it and paste the unsubscribe link in the URL field.
When you’re done, click the “Add to Menu” button. The link is displayed in the right column. You can adjust the position by simply dragging it up or down.
Don’t forget to click the “Save Menu” button to save your changes.
You can now visit your website to see the unsubscribe link in your navigation menu.
The problem with adding the unsubscribe link in the menu is that it is visible to all users (both signed in and signed out). It only makes sense to show the unsubscribe link to users who are actually signed in.
You can do this by following our instructions on how to display different menus for logged in users.
Add the WordPress unsubscribe link in the sidebar widget
WordPress comes with a standard widget called Meta. This widget contains a number of useful links, including a logout or login link to users.
Some people find that the other links in the meta widget aren’t quite as useful.
Alternatively, you can also add plain text or a custom HTML widget with the unsubscribe link in plain HTML. Here is the HTML you need to add:
Adding a dynamic login / logout link in WordPress
The problem with manually adding an unsubscribe link in WordPress is that it doesn’t change based on the user’s login status.
To fix this, you can use a plugin to dynamically display the login or logout link based on the user’s session.
First you have to install the Login or Logout Menu Item plugin. For more information on installing a WordPress plugin, see our step-by-step guide.
After you’ve installed and activated the plugin, go to Appearance »Menus in your WordPress admin and add the login / logout link to your menu.
After you’ve clicked “Save Menu” and checked your WordPress website, the link will appear in your menu.
Clicking that will take you to a page where you can log in. If you’re already signed in, you’ll be signed out.
This method also works with WooCommerce, MemberPress, and other WordPress ecommerce platforms.
We hope this article has helped you find the WordPress direct unsubscribe link and add it to your navigation menu. You may also want to check out our guide on how to add a call button in WordPress and track link / button clicks in WordPress to make data-driven decisions.
If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.