Members plugin shortcodes

members_access

This  shortcode is for hiding content from particular roles and capabilities. You need to wrap your content when using this shortcode:

{members_access role=“editor“}Hide this content from everyone but editors.{/members_access}

The plugin accepts the following parameters (mixing and matching won’t work):

* `role` – A single or comma-separated list of roles.
* `capability` – A single or comma-separated list of capabilities.
* `user_name` – A single or comma-separated list of usernames.
* `user_id` – A single or comma-separated list of user IDs.
* `user_email` – A single or comma-separated list of user email addresses.

**Parameters:**

* `capability`: A capability that has been assigned to a role.
* `role`: A user role from WordPress or one that you’ve created.
* `operator`: Accepts `!` to negate the role or capability.

Note that `capability` and `role` parameters aren’t used in conjunction. The code first checks for the capability (if input) then checks for the role (if input).

To check for multiple capabilities or multiple roles, simply add a comma between each capability/role. For example, the following code checks for an editor or administrator:

{members_access role=“administrator,editor“}Show this content to administrators or editors only.{/members_access}

To check that the user does not have a role:

{members_access role=“administrator“ operator=“!“}Show this content to anyone who is not an administrator.{/members_access}

members_logged_in

{members_logged_in}This content is only shown to logged-in users.{/members_logged_in}

members_not_logged_in

{members_not_logged_in}This content is only shown to logged-out visitors.{/members_not_logged_in}

members_login_form

 

More at readme.md of the Plugin