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

New Groups Restrict Categories and Groups Import Export.

  • 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 Import Export – An import and export extension for Groups.
  • Groups Jigoshop Groups integration for Jigoshop that supports memberships and subscriptions.
  • 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 PayPal – Sell memberships and subscriptions with Groups and PayPal.
  • Groups Restrict Categories features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.
  • Groups Restrict Comments Pro This extension for Groups allows to restrict who can post or read comments based on a user鈥檚 group membership.
  • Groups Subscriptions is a subscription framework for Groups.
  • Groups WooCommerce Groups for WooCommerce is a WordPress plugin that allows you to sell memberships.
  • WooCommerce Group Coupons This extension for WooCommerce uses Groups and WordPress roles to limit the validity of coupons.
  • 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.

1,901 Responses to Groups

  1. Suman kalyan mohanty February 1, 2016 at 9:05 am #

    Hi Antonio

    I m just using this plugin and it’s working good.
    All the users are automatically added to registered group by default.I want users to be added to my own created groups(eg:VETS,a group I created).
    Please let me know how to do that?
    Hope for a quick heads up.

    Regards
    SUman

    • antonio February 1, 2016 at 9:39 am #

      Hi Suman,
      you can use this code in your functions.php theme file. You need to change ‘Premium’ for your group’s name.
      Kind Regards,
      Antonio B.

      • Suman kalyan mohanty February 1, 2016 at 10:37 am #

        Hi again

        It’s working good after putting that code in functions.php.But now users are added to both registered and the group I created i.e vets, at the same time. How can I added the users to only “vets” group.

        I dont users to be added to registered groups.Please let me know as this is my client’s requirement.

        Thanks
        Suman

  2. Suman kalyan mohanty February 1, 2016 at 10:07 am #

    Hi again

    It’s working good after putting that code in functions.php.But now users are added to both registered and the group I created i.e vets, at the same time. How can I added the users to only “vets” group.

    I dont users to be added to registered groups.Please let me know as thisi s my client’s requirement.

    Thanks
    Suman

    • antonio February 1, 2016 at 10:42 am #

      Hi Suman,
      ‘Registered’ is the default group, it can not be removed. But it should not be a problem, simply limit your contents to the VET group.
      Kind Regards,
      Antonio B.

      • Suman kalyan mohanty February 1, 2016 at 10:53 am #

        Thanks a lot for the heads up 馃檪

  3. Aj February 4, 2016 at 12:27 am #

    I have been using the Groups plugin for around a year and it has worked great. Today I tried something that seemed very straightforward, but it is not working as expected.

    My problem involves two groups.

    GM Group
    Capabilities…
    – groups_read_post
    – access_all_shops

    Owner Group
    Capabilities…
    – groups_read_post
    – access_all_shops
    – access_shop_owners

    The WP users in question are assigned to either the ‘GM’ or ‘Owner’ group.

    I created a post that I gave an access restriction of ‘access_all_shops’.

    Inside that post I have several download link shortcodes (from WordPress Download Manager Pro). For one of these shortcode links I have added the Groups shortcode access restriction of ‘access_shop_owners’. It looks like this…

    [groups_member group="access_shop_owners"][wpdm_package id=’1060′][/groups_member]

    Expected Behavior
    The post would be accessible only to ‘Shop’ users but the one download link would only be seen by the ‘Shop Owners’.

    Actual Behavior
    The post is accessible only to ‘Shop’ users, but the one download link is hidden to everyone?

    What do I need to do to achieve the ‘Expected Behavior’? Thank you for your help.

  4. Aj February 4, 2016 at 12:41 am #

    I just solved my own question. It was a silly mistake with a simple answer. I was using the name of the ‘capability’ in the Groups shortcode instead of the name of the ‘group’ itself. Once I made that change, everything worked as expected.

    Thanks for a great plugin!

    • antonio February 4, 2016 at 8:10 am #

      Perfect 馃槈
      Kind Regards,
      Antonio B.

  5. Jerry Christensen February 4, 2016 at 4:47 pm #

    When a Woocommerce subscriber cancels their membership they are removed from all groups. How do I set it so they will automatically be placed in the Registered group upon cancellation?

    • antonio February 4, 2016 at 9:16 pm #

      Hi Jerry,
      by default new users are in ‘Registered’ group, so you don’t need to select the ‘Registered’ group in your subscriptions.
      Kind Regards,
      Antonio B.

      • Jerry Christensen February 4, 2016 at 9:29 pm #

        I thought that was the case as well however it was brought to my attention today that when a subscription is canceled the member is removed from all groups and they cannot see anything within the [groups_member group="Registered"]…[/groups_member] shortcode until I manually put them back in the Registered group. I also noticed that they are automatically assigned to the Registered group if I deactivate and reactivate the groups plugin. My question is, “Is there a way to make assignment to Registered group upon downgrade automatic without having to deactivate and reactivate the plugin?” Thanks so much for everything. I think your work is pretty amazing!

        • antonio February 5, 2016 at 9:03 am #

          Hi Jerry,
          what subscription plugin are you using ? Woocommerce Susbcription? So I can test this (If you want, you can send me dashboard admin access to antonio at itthinx dot com indicating this comment, and I’ll have a look at your settings).
          Kind Regards,
          Antonio B.

  6. Joffreu February 15, 2016 at 3:36 pm #

    Is it possible to restrict the edition and creation of article, of a certain cartegory to a certain group of admin ?

    I see how to restrict categories to users, but I’d like do to the same with administrators.

    • Kento February 15, 2016 at 7:33 pm #

      Hi,

      You can protect the category – if the user who is publishing the post doesn’t belong to a group that has access to the category, then it won’t be available to that user. Does that work for what you have in mind?

      Cheers

  7. Sophie Jones February 15, 2016 at 10:09 pm #

    Hello
    Is there any way to allow a user to manage one group, in a sense be the owner of that group and allow him to add sub-groups to his group if necessary without giving them major global permissions??
    Basically, I would like to be able to create the parent group for privileged role users and give them owner of the group and allow them to create subgroups in this group??
    My goal is to create a page using group shortcode and show list of users in this group with a custom field in their profile to show if they are available or not. So the owner/manager of this group can see, and add a button to open a form to create subgroup where he can add from users who are available and create his subgroup which he can later use on a custom post type.

    • Kento February 18, 2016 at 4:11 pm #

      Hi,

      Thanks for asking – it’s possible to create a group with administrative permissions for the Groups section itself, but it wouldn’t be possible yet to limit these to allow only subgroups to be managed by someone. We’re working on a more fine-grained permission model but it isn’t available yet.

      Cheers

  8. Karl February 17, 2016 at 4:13 am #

    Hi-

    I’m looking for a way (possible a small snippet added to my theme’s functions.php file) that would allow me to redirect a particular link or page to another url/page on my site based on the logged in user’s group or capability. More specifically, I’m looking to redirect a generic URL (call it https://mysite/dashboard) to one of several other urls based on a user’s assigned group.

    Any ideas?

    Note that I’m NOT just trying to redirect after login. I’m trying to systematically redirect a particular link…

    Thanks in advance!

    • Kento February 18, 2016 at 4:22 pm #

      Hi Karl,

      I would probably go about this in a similar way as used by Groups 404 Redirect – hooked on the wp action and using the Groups API to check to which group a user belongs (see Examples). Does that help?

      Cheers

  9. Elia February 17, 2016 at 6:11 am #

    Hi

    I use Groups to grouping my authors and I found an editor for any group.
    Now I want to add group filter to posts page to filter the posts by group.
    Is there a way for this issue?!

    Thank you

    • Kento February 18, 2016 at 4:04 pm #

      Hi,

      Thanks for the suggestion, currently there is not filter to show posts by authors’ group membership but it sounds like a useful idea. Maybe we can add this later on.

      Cheers

  10. Andrei G. February 25, 2016 at 4:20 pm #

    Hi,

    I have a site where there are many groups and subgroups and inherited capabilities. I am able to restrict access to pages or posts to a certain group or subgroup just fine.

    My question is how would I go about excluding access to a page or post for a specific group without having to list all the others that do have access?

    Thanks.

    • Kento March 1, 2016 at 7:20 pm #

      Hi Andrei,

      That’s a good question – in fact there are plans to add the possibility to exclude certain groups from being able to access a page, but currently it won’t be possible … maybe using the [groups_non_member] shortcode is a solution meanwhile? You can use it to enclose content on a page so that it is hidden from group members. If the page itself it protected, then that could work. Also note that you would have to combine it with the [groups_member] shortcode enclosing that section so that those who shouldn’t have access can’t see it either (if the page isn’t restricted).

      Cheers

  11. Brian Russell March 2, 2016 at 3:50 pm #

    Is there any way to get a multisite install to recognize group affiliation across the multisites? If I wanted a specific group to have access to that group’s access across the whole network?

    That would be incredibly helpful.

    • Kento March 16, 2016 at 12:30 pm #

      Hi Brian,

      Thanks for asking, this isn’t possible yet altough we’re already aware of the usefulness and should be providing a solution hopefully soon. See this topic for example.

      Cheers

  12. Juliette March 6, 2016 at 3:35 pm #

    Hi Itthinx team,

    Do you sell plugin’s group which allows to hide or to show different menus according to the group of the users ?

    Thanks
    Juliette

    • antonio March 7, 2016 at 5:34 am #

      Hi Juliette,
      you have available this plugin that you must customize it.
      Kind Regards,
      Antonio B.

      • Juliette March 7, 2016 at 8:41 pm #

        Hi Antonio,

        I’m talking about premium plugin that I can buy to you… :))

        But If you have a free plan…
        How can you do to install this file ? You install it in folder in /plugins/ ?

        Sorry I’m not developper… :oS

        • antonio March 8, 2016 at 8:52 am #

          Hi Juliette,
          maybe this solution is easier for you, please have a look at this conversation.
          Kind Regards,
          Antonio B.

  13. Keith March 10, 2016 at 11:26 am #

    Hi

    I am looking to see if the Groups membership plugin would allow me to do the following:

    Example: John Smith (member) logins into the site, and he can only see posts that have been assigned to him. No one else would see this posts.

    Would I need other extensions or custom coding to do that?

    Thanks

    • Kento March 10, 2016 at 6:04 pm #

      Hi Keith,

      With Groups you can grant access to members of a certain group, so in this case, you would protect the pages and then assign John Smith to the group that has access. See Access Control in the documentation for details please.

      Cheers

  14. Web March 16, 2016 at 2:31 am #

    We have Group Plugin on the website and we have around 1000 groups live for Access restrictions.

    The issue is when we have Groups plugin active with 1000 Groups, we are not able to load the images under the Add Media window quickly.

    Is anyone have idea how can we fix this issue????

    • Kento March 16, 2016 at 1:43 pm #

      Hi,

      I don’t see where this would affect the Media > Add New screen, the access restrictions aren’t even listed there so I’d like to find out why this is creating an issue for you on your site. Do you get any Javascript errors?

      Cheers

  15. Sam March 20, 2016 at 6:02 pm #

    Hi – i cant find a way to lists the users in a particluar group, on the front-end?

    • antonio March 21, 2016 at 3:22 pm #

      Hi Sam,
      you can use this plugin and use the [groups_users_list_group] new shortcode, with the ‘group_id’ attribute.
      Kind Regards,
      Antonio B.

  16. JoC March 31, 2016 at 1:48 am #

    I need access-protected posts to be visible on category pages (or any page that uses the $wp_query variable).

    I found the relevant code in the plugin directory /groups/lib/access/class-groups-post.access.php, in the function posts_where (there is a mySQL statement that pulls posts which aren’t protected or which the user doesn’t have the capability to access.

    Instead, I want all the posts to be visible, but if a user clicks on them, I want the posts to remain access protected.

    What adjustments can I make to the posts_where function, in order to accomplish this?

    • antonio April 4, 2016 at 8:55 am #

      Hi JoC,
      maybe Groups Excerpts can be a solution.
      Kind Regards,
      Antonio B.

  17. Desheen L. Evans April 7, 2016 at 7:12 pm #

    I have the plugin installed and set-up nicely, but I want to protect the page behind a payment wall and only allow visitors to sign up for a membership then they can access.

    Can someone help me by going into my WP dashboard?

    • antonio April 8, 2016 at 9:37 am #

      Hi,
      If you are using Woocommerce, you can use Groups Woocommerce to sell access to groups. So only users who purchase “this product” have access to the protected pages.
      Kind Regards,
      Antonio B.

  18. Marcus April 14, 2016 at 1:57 pm #

    Your plugin says that it can restrict access to custom types of media. For instance the access restrictions option comes up in my media library, if I apply a restriction to the media I find that it does not work. If i type the web address into a browser of which I am not logged into my site I go directly to that document. What I really would love is a way to completely lock down media/files using groups. Any help you can provide is appreciated.

    • Kento April 14, 2016 at 3:20 pm #

      Hi Marcus,

      That’s correct, the attachment page itself is protected but if you have the direct URL to the file it will still be accessible. You can protect files using Groups File Access, please have a look also at the documentation so you can see if that would be suitable for your requirements.

      Cheers

  19. Maxident April 22, 2016 at 11:11 am #

    Hi Kento,

    I am thinking about buying the groups file access plugin. As far as I understand file restriction works based on the group membership only. Is there a way to add a password request before the file can be downloaded if the member is part of a group that is linked to the file?

    I am not sure if membership alone is enough security.

    cheers

    • Kento April 22, 2016 at 1:12 pm #

      Hi,

      The user has to be logged in to access the file or use a specific link, otherwise it will not be accessible. There’s no additional password option to access the file, it’s not something that I would consider adding as I consider the plugin’s restriction already sufficient, but thanks for asking.

      Cheers

  20. Eric April 26, 2016 at 1:10 am #

    First off, fantastic plugin! Groups has really been helpful, so thank you!

    But I seem to have a strange issue. I’m using Groups to show/hide posts based on membership. However, if I make a post sticky, it shows up on the posts page even though the user doesn’t belong to that group. If you try clicking into the post, you get a 404, which is good. But I need to stop a sticky post from being listed on the posts page.

    Is marking a post sticky supposed to override Groups or am I just missing something here?

    Thanks!

    • antonio April 26, 2016 at 8:55 am #

      Hi Eric,
      Sticky posts override Groups, but you can use this code if you need to filter the sticky posts.
      Kind Regards,
      Antonio B.

  21. Martijn April 28, 2016 at 2:22 pm #

    Hi,

    We want to use groups to limit access to several pages/content.
    But there is one thing we want to do, were we don’t see any options for, so I don’t know if it can be done with this plugin or with any of the addons. So maybe someone here can help us out.

    For a couple of the groups we would like to have a specific group page, were some info for this group is displayed. Users can be in multiple groups.

    Is there a way to only display the pages the user has access too in a menu, preferably in the submenu.
    exaple : User X is part of group A,C & G
    So user X sees:
    grouppages
    -group a
    -group c
    -group g

    & user Y is part of group D & G and sees
    grouppages
    -group d
    -group g

    I hope its clear what we would want.
    Is this possible within this plugin and or its addons? or do we have to find another solution.

    Kind regards,

    Martijn

    • Kento May 1, 2016 at 9:13 am #

      Hi Martijn,

      If you add a restricted page to a menu through Appearance > Menu > Pages the menu item will only show up if the user has access. This works with protected posts, too, note that it will have no effect if you add a URL directly using Custom Links.

      Cheers

Leave a Reply