AIOSEO is the WordPress SEO plugin. Boost SEO rankings with AI SEO tools, schema, meta descriptions, XML sitem...
Easily add a log out link or button to a post or page using a simple shortcode.
Log Out Shortcode is a WordPress plugin that provides three shortcodes for logging users out of a site. The shortcodes allow for different behaviours: staying on the login screen, redirecting to the home page, or returning to the current page after logout. You can customize the link text, CSS classes, and redirect paths using parameters with the shortcodes.
This plugin is suitable for WordPress site administrators who want to offer users a simple way to log out with customizable options. It can be useful for membership sites or any site where user sessions need to be managed effectively.
Best for: This plugin suits WordPress site administrators looking for flexible logout options.
What it does well
Where it falls short
Log Out Shortcode provides straightforward logout functionality with some customisation. It may be a good choice for those needing specific logout behaviours.
Tectalic's own description of Log Out Shortcode, lightly tidied.
There are 3 shortcodes that can be used:
[logout] - A standard Log Out link, where the user stays on the login screen after being logged out.
[logout_to_home] - A link that logs the user out, and redirects them to your home page.
[logout_to_current] - A link that logs the user out, and redirects them back to the current page/URL.
Advanced Usage:
All 3 shortcodes all support 3 attributes/parameters:
[logout text="" class="" redirect=""]
The 3 supported attributes/parameters are:
text=""
– The text to use for the link anchor text.
– Default: Log Out
class=””
– The HTML class(es) to use for the link. Multiple classes should be separated by a space.
– Default: logout
redirect=””
– The path/URL to redirect the user to after they are logged out.
– Default: the WordPress login screen.
– Note: must be a URL or path on the same domain name as the WordPress website (cannot be an external domain/URL)
Some Examples:
[logout text=”Log Off”] – A Log Off link that logs the user out.
[logout redirect=”/members/”] – Log the user out, and redirect them to /members/.
[logout_to_home text=”Log Off”] – A Log Off link that logs the user out and redirects them to your home page.
[logout class=”log-out-link”] – Use a custom CSS/HTML class name for the log out link.
Note: the shortcodes will return nothing/empty if the user isn’t logged in.
This plugin is inspired by the Logout Button plugin by Ben Poland.
If you like, you can contribute to this plugin on GitHub.
Other plugins for managing URLs.
AIOSEO is the WordPress SEO plugin. Boost SEO rankings with AI SEO tools, schema, meta descriptions, XML sitem...
Manage 301 & 302 redirects. Simple redirection & redirects validation. Includes redirect stats & 4...
Redirect to any page or URL, execute scripts after submission, save data to the database, and unlock additiona...
Permalink Manager enhances WordPress’s built-in URL system, allowing you to change the URLs of native and cust...
Lifetime SSL solution - Free SSL certificate & HTTPS redirect, fix insecure site / SSL errors, Security he...
Manage 301 redirects, track 404 errors, and improve your site. No knowledge of Apache or Nginx required.