Groups

Groups is a WordPress plugin that provides group-based user membership management, group-based capabilities and content access control. It integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.

Extensions

  • See all related Premium Extensions for Groups in our shop.
  • Groups Drip Content is used to release content on a schedule. Content dripping can be based on user account creation, group memberships and specific dates and times.
  • Groups Restrict Categories features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.
  • Groups WooCommerce Sell Memberships with Groups and WooCommerce. Groups WooCommerce grants memberships based on products. It automatically assigns a customer to one or more groups based on the products ordered. Use any payment gateway that is supported by WooCommerce, including PayPal, Stripe and many others. Groups WooCommerce also integrates with WooCommerce Subscriptions for a highly flexible membership solution.
  • WooCommerce Group Coupons This extension for WooCommerce uses Groups and WordPress roles to limit the validity of coupons.
  • WooCommerce Product Search is the essential extension for every WooCommerce store. It provides the best Search Engine and Search Experience for WooCommerce and is compatible with Groups and its access restrictions on products.
  • Groups Import Export provides import and export facilities for Groups. Users can be imported and assigned to groups, users can be exported in bulk.
  • Groups 404 Redirect allows to redirect visits to pages that are protected by Groups.
  • Groups Blog Protect restricts access to blogs based on group membership.
  • Groups File Access Groups File Access is an extension that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
  • Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.
  • Groups Gravity Forms allows to add users to groups automatically, based on form submissions.
  • Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.
  • Groups Notifications allows to send automatic notifications to group members and the site administrator.
  • Groups Restrict Comments Pro This extension for Groups allows to restrict who can post or read comments based on a user’s group membership.
  • WooCommerce Groups Newsletters The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.

Features

User groups

  • Supports an unlimited number of groups
  • Provides a Registered group which is automatically maintained
  • Users can be assigned to any group
  • Users are added automatically to the Registered group

Groups hierarchy

  • Supports group hierarchies with capability inheritance

Group capabilities

  • Integrates standard WordPress capabilities which can be assigned to groups and users
  • Supports custom capabilities: allows to define new capabilities for usage in plugins and web applications
  • Users inherit capabilities of the groups they belong to
  • Groups inherit capabilities of their parent groups

Access control

  • Built-in access control that allows to restrict access to posts, pages and custom content types to specific groups and users only
  • control access to content by groups: shortcodes allow to control who can access content on posts, show parts to members of certain groups or to those who are not members Shortcodes: [groups_member], [groups_non_member]
  • control access to content by capabilities: show (or do not show) content to users who have certain capabilities Shortcodes: [groups_can], [groups_can_not]

Easy user interface

  • integrates nicely with the standard WordPress Users menu
  • provides an intuitive Groups menu
  • conceptually clean views showing the essentials
  • quick filters
  • bulk-actions where needed, for example apply capabilities to groups, bulk-add users to groups, bulk-remove users from groups

Sensible options

  • administrator overrides can be turned off
  • optional tree view for groups can be shown only when needed
  • provides its own set of permissions
  • cleans up after testing with a “delete all plugin data” option

Access Control

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

Framework

  • Solid and sound data-model with a complete API that allows developers to create group-oriented web applications and plugins

Multisite

  • All features are supported independently for each blog in multisite installations

Your opinion counts

You & Groups

Beta-testers and developers who need to integrate group-based features in their plugins and web applications: please use it and provide your feedback.

Feedback

Feedback is welcome!

If you need help, have problems, want to leave feedback or want to provide constructive criticism, please do so here at the Groups plugin page.

Please try to solve problems there before you rate this plugin or say it doesn’t work. There goes a lot of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Thanks!

Twitter

Follow me on Twitter for updates on this and other plugins.

Introduction

Content Access Control

Access restrictions on posts

On posts an pages (and custom content types) a new meta box titles Access restrictions appears. By checking Enforce read access, you can restrict access to the post to groups and users who have the groups_read_post capability. You need to assign this capability to a group and make users members of that group to allow them to see those posts.

Content visibility for members and non-members

The [groups_member] and [groups_non_member] shortcodes are used to limit visibility of content to users who are members of a group or users who are not members of a group. Multiple comma-separated groups can be specified.

Example: Limiting visibility of enclosed content to registered users.

[groups_member group="Registered"]

Only registered users can see this text.

[/groups_member]

Content visibility based on capabilities

The [groups_can] and [groups_can_not] shortcodes limit visibility of enclosed content to those users who have the capability or those who do not have it. Multiple capabilities can be given.

Example: Showing enclosed content to users who can edit_posts (standard WordPress capability).

[groups_can capability=”edit_posts”]

You can see this only if you have the edit_posts capability.

[/groups_can]

Integration in the ‘Users’ menu:

Users – group membership is managed from the standard Users admin view. Users are automatically added to the Registered group. You can add multiple users to other groups here and also remove them.

Sections in the ‘Groups’ menu:

Groups

Here you can:

  • add groups
  • remove groups
  • assign capabilities to groups

Capabilities

This is where you add, remove and manage capabilities.

Capabilities can be assigned to groups and users (1). These capabilities include the standard WordPress capabilities but you can also define additional capabilities for your web-application.

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

(1) Assigning capabilities to users is not integrated in the user interface yet but can be done through API calls.

Options

Administrator override :

Administrator overrides can be turned off.

Permissions :

For each role these permissions can be set:

  • Access Groups: see information related to Groups.
  • Administer Groups: complete control over everything related to Groups.
  • Administer Groups plugin options: grants access to make changes on the Groups > Options admin section.

Testing the plugin :

A convenient option is provided to delete all data that has been stored by the Groups plugin. This option is useful if you just need to start from fresh after you have been testing the plugin.

Shortcodes

Please visit the documentation page on shortcodes for up-to-date information: Groups Shortcodes

Download

Download the Groups plugin on WordPress.

2,594 Responses to Groups

  1. Dean Baker April 21, 2022 at 8:08 pm #

    Hi, I am hoping to get some quick help on this. I have 2 groups: group1 and group2. All users in group2 are also in group1. There are however users in group1 that are not in group2. I want to have a WooCommerce product “X” be seen by group2, and product “y” be seen by users in group1 that are NOT in group2. I am hoping to keep it so that group2 does not see both. It is fairly easy to do this type of logic in Gutenberg blocks with the ability to nest the blocks combined with the member and non-member blocks. I don’t see how to do this in the Groups/Woocommerce integration. I am hoping to do this without having to create a group3 to include the subset (users in group1 that are NOT in group2). I hope this makes sense. Any thoughts would be helpful.
    Thanks in advance.

    • Kento April 29, 2022 at 12:31 pm #

      Hi Dean,

      For this customized rule you would have to use filters on parts of the post access control system. A start would be to use the groups_post_access_user_can_read_post filter where you would check the group memberships using Groups’ API (see Examples on how to obtain a user’s membership for a particular group). You might also need to use the groups_post_access_posts_where filter to make sure that the exclusion is upheld when WordPress retrieves sets of products, e.g. when showing them in the shop.

      As you can see, this requires a certain level of customization on your part, but if you know how to work with filters or use an experienced developer to do this for you, it’s quite easy actually.

      Cheers

  2. Antoinette April 5, 2022 at 2:35 pm #

    Greetings,
    How do I preview the groups I’ve created? The system did not produce a link once I created a group in the WP dashboard.

    I’d like to see what the user interface looks like for group members — i.e., can they see the top or right navigation bars of my theme?
    Thanks,
    Antoinette

    • Kento April 5, 2022 at 4:56 pm #

      Hi Antoinette,

      It would be suitable to create one or more test user accounts that are assigned to the groups you would like to check out. You can work with your administrator account in one browser and work with a test user in another browser while you test things. The menus will usually contain items depending on whether the users have access to their content, e.g. if you create a Page menu item and that page is protected, only members of the corresponding group will see the item. This does not apply to custom links. I’d recommend to have a look at the documentation, for example the section on Access Control where you can find more info and ideas.

      Cheers

  3. Felipe March 12, 2022 at 11:00 am #

    Hi! I’m creating a post form on the frontend. How do I display a list of groups and select? The plugin I will use is ACF.

    • Kento March 24, 2022 at 1:08 pm #

      Hi Felipe,

      I’m not aware of a particular integration with Groups for ACF. What you could do, is try to use Groups’ shortcodes or API maybe inside a customized template.

      Cheers

  4. Tamryn February 11, 2022 at 4:20 am #

    Hello – Thank you for taking my question. Can members in groups upload photos or files or videos with Groups?

    • Kento February 18, 2022 at 9:39 pm #

      Hi Tamryn, thanks for asking! To let group members upload files you could use a protected section along with a form plugin. The uploaded files would however not be restricted to the group members. We do provide a premium extension Groups File Access but it allows to manage protected files via the back end where users with administrative rights can upload files and determine which group members can access them. But this extension would not allow group members without administrative rights to upload files.

  5. Tamryn February 9, 2022 at 6:46 pm #

    Hello – can you please tell me if all of the Groups plugins are available for wordpress.com sites (not wordpress.org)? Thank you in advance 🙏♥

    • Kento February 10, 2022 at 1:59 pm #

      Thanks for asking!

      To be able to install any plugin, you need to have at least the Business plan on WordPress.com – see https://wordpress.com/pricing/ – if that’s what you have in mind, you can install its extensions.

      Cheers

      • Tamryn February 11, 2022 at 4:14 am #

        Hello Kento,

        Thank you for showing me where to find it. This is so helpful 🙂

  6. Tamryn February 9, 2022 at 6:41 pm #

    Hello – can you tell me please if Groups is compatible with Thrive Themes?

    Thank you 🙂

    • Kento February 10, 2022 at 1:57 pm #

      Hi Tamryn,

      I guess so, simply try it out? It works with any theme as long as the theme doesn’t do weird stuff with post types.

      Cheers

      • Tamryn February 11, 2022 at 4:13 am #

        Thank you Kento for your answer 🙂

  7. Brandon January 30, 2022 at 10:15 pm #

    I would like to display a list of the users of groups that are assigned to posts with a short code, what would be the shortcode to do this? Some posts might have multiple groups assigned to the them so the list needs to include all of the users from the assigned groups.
    Thanks

  8. Andrew Batallones January 21, 2022 at 4:31 pm #

    Hello,

    I want to see if when a customer changes groups or gets assigned a new group if the customer’s modified_date timestamp gets updated. If not, is this something that could get implemented with this plugin?

    Thank you!

    • Kento January 26, 2022 at 10:52 am #

      Hi Andrew,

      A group membership would not necessarily modify the timestamp unless that happens because you are e.g. editing the user on the back end. If you want to assure that the timestamp is modified on every group membership event for a user, you could use these actions to hook into and modify the timestamp appropriately:

      – groups_created_user_group
      – groups_updated_user_group
      – groups_deleted_user_group

      These actions are documented on https://docs.itthinx.com/document/groups/api/actions/

      Cheers

  9. kia January 18, 2022 at 8:06 pm #

    Hi,

    I’d like to request a feature / report an issue.
    A user that’s in a group with permission to add posts can only see the groups they are in or that their group is parent of when adding a post, which is good; this is expected behaviour.
    But when the same user scrolls through the list of posts (https://my-wp-url.org/wp-admin/edit.php), that their group has permission to see, there is unexpected behaviour: In the “groups” column, the user can also see groups (out of the hierarchy) that their group is not parent of, so groups they shouldn’t see, like when adding a post.

    Example:
    Having users Jane and John and groups “cool”, “great”, “genius” and “special” with hierarchy genius > great > cool (where ‘>’ means parent of) and “special” which coexists apart from hierarchy and contains some special users that might be in some of the other groups.
    Jane is in group “genius”, John is in groups “great” and “special”.

    When John adds a post, he can choose whether he wants to restrict the post to members of “great”/”special” or make it visible to the “cool” members, too. Which, again, is expected.
    When John scrolls through all the posts he has access to, he finds a post, that was added by Jane and restricted to “special” members which John is a member of, so he can see the post, which is fine. But Jane also released this post to some other group, say “buddies” whose group name is now visible to John in this view. This is unexpected.

    Thanks for taking a look at this!
    Cheers

    • Kento January 20, 2022 at 3:35 pm #

      Hi kia,

      Many thanks for describing this in detail! Yeah we should probably hide those group names from those who are not members. Note taken to include in an update.

      Cheers

      • Kento January 20, 2022 at 4:11 pm #

        On second thought … it could also be considered useful and necessary that the group(s) that John in this case is not a member of are visible to him. Consider that for example Jane might need to grant access to the “buddies” group and would like John to be aware of it, even though he doesn’t belong to them. In fact, if John goes in and makes a change and saves the post, if he doesn’t belong to the group, those members won’t have access anymore. Example:

        We have these groups: Health, Fruit and Vegetables.

        John and Jane are both members of the Health group.
        John is a member of Fruit.
        Jane is a member of Vegetables.

        John creates a new Post and restricts it to the groups Health and Fruit.
        Jane can see that the Post is restricted to those groups on the Dashboard under Posts.
        Now Jane edits this same Post, but she will only be offered the Health or Vegetables groups for restriction. Even though the Post is still protected by both the Health and the Fruit groups, she will only see Health in the Groups > Read field. If Jane saves the post, she might think that she’s not changed anything, but she’s actually removed access to the post from the members of the Fruit group.

        • kia January 26, 2022 at 5:54 pm #

          Hey Kento,

          Thank you for your reply. I thought a bit about it and I’m partly confused.
          Shouldn’t it be that all changes that are made on a post are connected to that post and not to the groups?

          But I see that it makes sense that someone knows if they edit a post that these changes might be visible to other people too.

          So maybe it makes sense to show an information that informs the user that the post is visible to other groups that this user isn’t part of.

          So in your example, Jane would see her groups as described and an additional note that there are other groups that can see the post.

          Cheers,
          Kia

          • Kento January 31, 2022 at 11:52 am #

            Hi Kia,

            Many thanks for your thoughts on that.

            > Shouldn’t it be that all changes that are made on a post are connected to that post and not to the groups?

            I would say yes and no, depending on what perspective one would assume. I think that the confusion comes from the mix of a) users can edit posts depending on role and b) users can assign groups depending on their group membership.

            Ideally, a user who creates and maintains a post would be able to lock/protect a post from editing by other users who do not belong to the “right” group(s). The problem IMO is that we still do not have fine-grained permissions that would allow to act on particular objects (i.e. posts in this case).

            > So maybe it makes sense to show an information that informs the user that the post is visible to other groups that this user isn’t part of.

            Yes, I think that it makes sense that everyone who can edit posts can see what groups are granting read/view access to a post, even though they do not belong to all groups that are related (but as long as they belong to at least one of them, otherwise they wouldn’t be able to see the post listed).

            > So in your example, Jane would see her groups as described and an additional note that there are other groups that can see the post.

            Maybe it would be a good idea to show that a group is “locked” when a user is editing a post with a group that the user does not belong to. But my gut tells me this would be going in a direction where we’re patching up things as a consequence of having incomplete administrative features (features which in fact we do currently lack).

            I reckon that as long as we don’t have a fine-grained permission model underlying, these scenarios will always be ambiguous and confusing. The good news is that we’ve been looking into this and working on extending our data model to make that happen, but it still seems a long stretch until we can get to something that is pragmatic.

            I’d love to hear feedback from anyone who’s following these ideas around Groups.

            Cheers

            • kia February 6, 2022 at 7:42 pm #

              Hi Kento,

              Many thanks for your reply.

              I see, there’s quite some things to consider for not producing unexpected behaviour …
              Maybe a safe way that does not include major reconstruction would be to only extend the groups column (e.g., in the list of posts) with a note that other groups have access to a content without spoiling the groups’ names. This would be consistent with the selection of groups that a group member sees when producing their own content.

              However, I don’t want to bother you too much on this! If you think this makes sense, it’d be nice to have this feature included in a further release. If not, I’ll survive it 😉

              Cheers!

              • Kento February 10, 2022 at 2:14 pm #

                Thank you very much for your ideas, it’s not a bother at all but really valuable feedback!

                What you suggest also makes sense to me, maybe not for everyone, but I can see that in certain cases it would. We could consider that even via filters that allow to adjust what Groups is showing so one can easily customize those views.

                The more I think about it, the more complex the scenarios get 😀 …

  10. Isidro Calabuig December 7, 2021 at 9:01 am #

    Hi, can a group have an admin user? I mean, an user that have more capabilities than a regular one, like add and delete users of their group.

    Is it possible? Thanks!

    • Kento December 18, 2021 at 10:44 am #

      Hi Isidro, good question and in line with what we are working on as an extended data model for Groups. At the moment, the permissions related to groups are rather coarse, meaning that you cannot determine a specific permission for someone towards a specific group.

Leave a Reply

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share