plugin-icon

Log Out Shortcode

제작자: Tectalic·
Easily add a log out link or button to a post or page using a simple shortcode.
등급
5/5
버전
1.1.1
활성화된 설치 항목
3K
최근 업데이트일
Jul 17, 2024

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.

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.6.4
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.