WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Tectalic v1.1.1

Log Out Shortcode

Easily add a log out link or button to a post or page using a simple shortcode.

Log Out Shortcode

The facts

Rating
5★ from 12
Active installs
3k+
Price
Free
Last updated
17 Jul 2024
Added
Aug 2014
Requires WP
6.0
Tested up to
WP 6.6.7
Downloads
52,461

Our analysis

AI-assisted

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

  • Offers three different logout shortcodes
  • Customizable link text and CSS classes
  • Redirect options available after logout
  • Free to use from the WordPress.org directory
  • Compatible with WordPress up to version 6.6.7

Where it falls short

  • Limited information on advanced usage
  • No external URL redirects allowed

Verdict

Log Out Shortcode provides straightforward logout functionality with some customisation. It may be a good choice for those needing specific logout behaviours.

From the developer

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.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for managing URLs.

All in One SEO

AIOSEO is the WordPress SEO plugin. Boost SEO rankings with AI SEO tools, schema, meta descriptions, XML sitem...

Free 2M+ installs 4.7★ (5,201)
301 Redirects

Manage 301 & 302 redirects. Simple redirection & redirects validation. Includes redirect stats & 4...

Free 300k+ installs 4.7★ (578)
Redirection for Contact Form 7

Redirect to any page or URL, execute scripts after submission, save data to the database, and unlock additiona...

Free 200k+ installs 4.7★ (275)
Permalink Manager Lite

Permalink Manager enhances WordPress’s built-in URL system, allowing you to change the URLs of native and cust...

Free 100k+ installs 4.8★ (176)
WP Encryption

Lifetime SSL solution - Free SSL certificate & HTTPS redirect, fix insecure site / SSL errors, Security he...

Free 50k+ installs 4.9★ (1,143)
Redirection

Manage 301 redirects, track 404 errors, and improve your site. No knowledge of Apache or Nginx required.

Free 2M+ installs 4.4★ (703)