Primary

[groups_login]

The [groups_login] shortcode renders a login form.

This shortcode allows the use of the following attributes:

  • redirect defaults to the current URL and will redirect to the given page after successful login.
  • show_logout defaults to "no" and if set to "yes" will present a logout link in place of the login form when the user is logged in.

Example:

Let’s assume that you want to grant access only to members of the Advanced group.

  1. Create a page without restrictions as the main page for your members.
  2. Place these shortcodes:

[groups_login]

[groups_member group="Registered"]
[groups_non_member group="Advanced"]
Access is granted only to members of the Advanced group
[/groups_non_member]
[/groups_member]

[groups_member group="Advanced"]
Only members of the Advanced group can see this.
Members page 1 link
Members page 2 link
[/groups_member]

Only logged in users, who are members of the Advanced group will be able to see links to Members page 1 and 2. These pages should also be restricted with the Advanced group’s capability (advanced).

Remember: Groups uses the user records that are available on your site, it doesn’t keep a different set of users.