[groups_logout] shortcode renders a link for users to log out.
This shortcode allows the use of the following attribute:
redirectdefaults to the current URL and will redirect to the given page after logout.
Here is an example that will remind members to log in before they can access the content, or offer others to create a new account.
- Create a page without restrictions as the main page for your members.
- Create another page without restrictions to redirect after logout, for example: http://www.example.com/here
- Place these shortcodes on a page:
<h2>Please log in</h2>
Please log in to access the content.
You can read this content because you're logged in.
redirect attribute to redirect to a specific page after logout: