Groups is designed as an efficient, powerful and flexible solution for group-oriented memberships and content access control.

It provides group-based user membership management, group-based capabilities and access control for content, built on solid principles.

Groups is light-weight and offers an easy user interface, while it acts as a framework and integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.

Enhanced functionality is available via Official Extensions for 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.

Documentation

The official documentation is located at the Groups Documentation pages.

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

Access to posts, pages and custom post types can be restricted by group.

If access to a post is restricted to one or more groups, only users who belong to one of those groups may view the post.

Fully supports custom post types, so that access to post types such as products or events can easily be restricted.

  • 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: ,
  • Control access to content by capabilities: show (or do not show) content to users who have certain capabilities –
    Shortcodes: ,
  • Blocks: The Groups Member block allows to restrict the visibility of its content to members of selected groups.
    The Groups Non-Member block hides its content from members of chosen groups.
    The blocks can be nested to provide multiple layers of access control to content.

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

  • Enable access restrictions by custom post type
  • An optional tree view for groups can be shown when desired
  • Provides its own set of permissions
  • Administrator overrides for tests
  • Cleans up after testing with a “delete all plugin data” option

Framework

  • Groups is designed based on a 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

Extensions

Enhanced functionality is available via official Extensions for Groups.

Groups is a large project that is providing essential functionality to tens of thousands of sites since 2012. By getting an official extension, you help fund the work that is necessary to maintain and improve Groups.

  • Groups WooCommerce : Sell Memberships with Groups and WooCommerce – the best Group Membership and Access Control solution for WordPress and WooCommerce.
  • 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.
  • WooCommerce Group Coupons : Automatically apply and restrict coupon validity for user groups. Offer exclusive, automatic and targeted discounts for your customers.
  • Groups Drip Content : Release content on a schedule. Content dripping can be based on user account creation, group memberships and specific dates and times.
  • Groups File Access : Allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
  • Groups Restrict Categories : Features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.
  • Groups Forums : A powerful and yet light-weight forum system for WordPress sites.
  • Groups Import Export : Provides import and export facilities around users and groups.
  • Groups Newsletters : Newsletter Campaigns for Subscribers and Groups, also integrates with WooCommerce.
  • Groups Gravity Forms allows to add users to groups automatically, based on form submissions.
  • Widgets Control Pro : An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently.

Get involved

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 leave a comment below.

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!

Stay informed or contribute

Follow @itthinx (or on Reddit, Mastodon, … ) for news related to Groups and other plugins.

Get development notifications, contribute code or open issues at the repository on GitHub.

Translations

Translations have been contributed by many from the WordPress community, via the GitHub repository Groups, the section for Groups on Translating WordPress or as direct contributions.

Where to get Groups

Groups is free. You can install it directly from your WordPress dashboard or download it from the Groups plugin page and install it manually.


Comments

2,693 responses to “Groups”

  1. Hi,

    Really remarkable plugin, easy to pick up and with lots of depth. All going very well for me, except I’m finding when I use get_groups with an ordering parameter, it is ignored and simply uses the group_id.

    So this for example doesn’t order by name:
    $groups_args = array(
    'fields' => 'name, group_id',
    'order_by' => 'name',
    );
    $all_groups = Groups_Group::get_groups($groups_args);

    Running the SQL statement manually works perfectly though:
    $all_groups = $wpdb->get_results( "SELECT name,group_id FROM $groups_table ORDER BY group_id" );

    Thanks for your help.
    Vaughan

    1. Hi Vaughan,

      There’s a bug in that method which results in that parameter being ignored. It’s fixed in the next release but it’s currently unstable and undergoing heavy changes so I would rather advise you to extend that class and override the method – the bug I’m referring to is on line 496 and the switch( trim( $field ) ) { should read switch( trim( $order_by ) ) {.

      Cheers

  2. Hello,

    we are using groups with groups woocommerce and subscriptions.

    I would like to change the default group name from “Registered” to “Free”.
    Is this possible?

    Thanks,

    1. Hi Prashant,

      You can’t change the name of the “Registered” group, if it’s for display in content, you could use a conditional shortcode though. For example:

      [groups_member group="Registered"]Free[/groups_member]

      Cheers

      1. Hi Kento,

        Thanks for your reply. but i would like to change label within dashboard as well.. i am using groups plugin with groups woocommerce to create memberships.

        I want to update default group name from “registered” to “Free”.

        will it work if i update the constant name from class-groups-registered.php file?
        const REGISTERED_GROUP_NAME = ‘Registered’; to
        const REGISTERED_GROUP_NAME = ‘Free’;

        Let me know your suggestions,

        1. Hi Prashant,
          as @itthinx says you can’t change the name of the ‘registered’ group.
          You could change the default group when an user is registered.
          This code can help you.
          cheers

  3. Hi, i have some comment . It will be helpful add functionality blocking conntet after more tag automatically.

    1. Many thanks for the suggestion, this would be possible if we can restrict access to the whole post but let visitors view the excerpts. Work on that is in progress.

  4. John Padget Avatar
    John Padget

    Hi,

    I have the groups and groups 404 plugin. I want all users to be able to see my site navigation menu in full but when they click on a link that has members access it redirects them to my registration page and tells them the page they are trying to access is members only.

    I have set up everything and it works fine except the the menu items are hidden for non members. I thought I had found a way around it by replacing the menu items as links in the navigation but the 404 doesn’t redirect the link from the navigation. If I type the address of the hidden page in the address bar when logged out it redirects to the my registration page perfectly.

    I’d like to be able to keep my full navigation visible so that users now the benefits they are getting for becoming a member. Help?

    1. Hi,
      you can add in your functions.php file:
      remove_filter ( 'wp_get_nav_menu_items', array( 'Groups_Post_Access', 'wp_get_nav_menu_items' ), 1, 3 );
      cheers

  5. Chris Martin Avatar
    Chris Martin

    Hi… my html was removed in the previous comment…

    I am currently setting up Groups and it looks like I will be making several purchases to set up as Woocommerce membership and affiliate system. I am currently having a formatting issue I am trying to resolve:

    I am using the following [groups_can capability="yes"]<h3>Yes</h3>[/groups_can] and [groups_can_not capability="yes"]<h3>No</h3>[/groups_can_not]

    The html output I am getting is as follows:

    <p></br></p>
    <h3>Yes\No</h3>
    <p></br></p>

    If I remove the <h3> from the shortcodes I get:

    <p>Yes\No</p>

    I have disabled wpautop in my functions file but cannot figure out how to stop the addition <p> and <br/> tags being added?

    Many Thanks

    1. Hi,
      this is not a problem with Groups. You can try to add to your functions.php file (be sure you are editing in the active theme):
      remove_filter('the_content', 'wpautop');
      cheers

  6. Chris Martin Avatar
    Chris Martin

    Hi,

    I am currently setting up Groups and it looks like I will be making several purchases to set up as Woocommerce membership and affiliate system. I am currently having a formatting issue I am trying to resolve:

    I am using the following [groups_can capability="yes"]Yes[/groups_can] and [groups_can_not capability="yes"]No[/groups_can_not]

    The html output I am getting is as follows:

    Yes\No

    If I remove the from the shortcodes I get:

    Yes\No

    I have disabled wpautop in my functions file but cannot figure out how to stop the addition and tags being added?

    Many Thanks

  7. Is there any way to limit the time someone is assigned to a group? For example – I sign up for the website. After my user is approved (and assigned to a group), the duration of that membership should last 1 year. After 1 year, the membership to the group expires?

    I know that WooCommerce Groups can sort of do this, except I don’t want to charge for membership. Any ideas how to set time limits to group membership without having them go through a checkout process via woo commerce?

    1. Hi Dave,

      With Groups for WooCommerce you can also use products free of charge, the system will do the assignments based on time-limited memberships as with ‘normal’ products.

      Cheers

  8. Hi there.

    I use the plugin to manage my pages access. it work fine but I have a question. If I set a restriction to a page, there is a way for this restriction to be applyed on all subpages without having to set manually this restriction to all of them ?

    Thanks !

    1. Hi David,

      Thanks for asking, currently you would have to apply the restrictions to all sub-pages individually, but the idea is interesting and I’ve taken note to consider it.

      Cheers

  9. Hi, I’m working on a WordPress 4.x site with the latest Groups plugin – I love it, but I’m struggling with the following:

    Most of the site will be made up of pages / subpages, with few posts.
    The Groups plugin allows me to enforce read access quite nicely.

    I also need to restrict write access – only specific groups/users should be able to edit specific pages.

    Write access in WordPress appears to be an all on/off setting, and it’s too error-prone for our users.

    Ideally, I would want the admins to set up the basic page (menu) structure, and give edit permissions to these (sub-)pages to the appropriate users/groups.

    Is there a best practice, and is it even possible with Groups?

    P.S. This request seems similar to comment 340543.

    1. Hi,

      Many thanks for describing your case, this is indeed similar to other requests like Tevya’s, where access restrictions to edit/write posts would be useful. I also agree that the standard WordPress restrictions which can be used to edit a post (or any post type) are insufficient when we need to restrict who can edit posts on a per-post basis. The good news is that I’m already working on a solution to this based on Groups – I can’t give an ETA on this yet though. If you’d be interested in beta testing, please let me know. I always appreciate direct feedback from real cases where the plugin is deployed.

      Cheers

  10. Hi Kento,

    I have created two groups.

    – Basic
    – Premium

    When a user buys one of these packages they are assigned to the specific group. That’s working fine. But I like them to be assigned to a specific user role as well. Is there a way to do this?

    Hope you can help, thanks!

    1. Hi Again,

      Is it possible to display the remaining days a user is member of a group? For Premium I have three different options.

      – 1 month subsciption
      – 3 month subsciption
      – 1 year subsiption

      Is it posible to echo the days remaining? Like ’52 days Premium Membership remaining’.

      1. Hey Sjoerd,

        There’a shortcode you can use, see Shortcodes in the documentation please.

        Cheers

    2. Hi Sjoerd,

      I assume you’re referring to Groups WooCommerce. The extension integrates with Groups and allows to do the group membership assignments but it is not intended to do that with roles.

      Cheers

  11. Hi Kento,
    I just downloaded your pluggin and gave it a swing.
    Off the bat I thought I’d highlight a bug.

    If we create a group with capabilities, assign these capabilities to a page and then delete the group/capability, the access restrictions options in the Pages screen still show all deleted capabilities.

    On further inspection these options are pulled in from the wp core options table. So I assume that we are not updating the option on the delete function.

    You may have caught that already but if not, there it is.

    cheers,
    xK

    1. Hi Kitt,

      Thanks for pointing out the issue. Yes, this is a known bug and will be fixed in the next release.

      Cheers

  12. When Groups plugin is enabled, setting DISALLOW_FILE_EDIT in wp-config.php has no effect – administrators can still edit files.

    1. No that’s not correct. Go to Groups > Options and uncheck the option Administrators override all access permissions derived from Groups capabilities. please.

      1. Thank you for your response.

        Now, am I getting this right? This setting (http://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing) is completely useless? It’s weird, that a setting in a database, that can be changed in the admin panel, can override a hardcoded setting. But I now understand, that it is by design of WordPress, and not a Groups plugin flaw. So the only reliable solutions is to keep proper files and directories read-only.

        1. Hi Avaer,

          The flag has its appropriate purpose, to disable file editing through the administrative interface. Groups’ administrator override has the effect of granting the permissions that the flag removes. As you want to use the flag, keep the administrator override turned off under Groups > Options. You don’t need to have that enabled on a production site.

          I hope that makes it clearer 🙂

  13. No matter what I try, I cannot get traces of GROUPS capabilities to delete from certain subdirectories; they all show up as 404 error for logged in users or unregistered users. I tried deleting plugin, erasing capabilities, erasing groups, removing all restrictions, deleting all data (setting checkbox), erasing and reinstalling brand new GROUPS plugin. Nothing works! Please help to get my site in order, thanks!

    1. Hi,
      probably you have an old capability assigned to a post type. You can send us dashboard admin access to support at itthinx dot com and we’ll have a look (please indicate this comment in the email).
      cheers

      1. Hi, thanks for the reply. How can I check if there is an old capability assigned to a post type? If you can give me a brief explanation and guide, I can try, and if not, I will gladly send you admin info. Thanks!!!

        1. Hi, answered by email.
          cheers

      2. Hi, I sent support an email with credentials and look forward to the support. Thank you.

        1. Thanks, answered by email. cheers

          1. Hi Antonio, can you please be more specific with the support email reply? What must I do now? Thanks

  14. I would like to know how to allow unregistered users to view my WooCommerce Shop page. It is my understanding, that once they order they are prompted to register. However, without being able to access the shop page, they cannot order and therefore register. I feel that it is important for customers to be able to see the shop page before registering as it might motivate them.

    I found this somewhere:
    “You can identify non-members by checking for their membership with the Registered group. On this page http://www.itthinx.com/documentation/groups/api/examples/ you will find an example on how to check if a user belongs to a “Foobar” group. Exchange “Foobar” with “Registered” and you can work with $is_a_member – it will be true for members and false for those who are not.”
    I am not sure if this would solve my problem or not. I don’t like messing with the functions.php (is that where this would go?) unless I am sure about the result.
    Any suggestions?

    1. Hi Julie,

      Simple visitors are able to view your shop page by default. There is nothing special you need to do to allow them to view it. I wrote a post some while ago on How to hide the WooCommerce Shop page because that indeed requires specific changes to be done.

      Cheers

      1. Hi Kento,

        Thanks for responding! I finally figured it out with a little help. Below the product data section on the shop page was a custom field with capabilities in it. (No idea where that came from.) Once I deleted that custom field, the product showed up on the shop page.

  15. I have followed all the directions in the images on

    http://eggemplo.com/plugins/affiliates-groups/

    Once I have all the settings set up correctly and the plug in installed, I do not see a groups option under the Affiliates Menu. Even when I look at each of the products I do not see the groups listed there I only see what I can give the product as the default referral rate.

    I have screen shots I can email you to show that the groups do not show up as an option under each thing.

    1. Hi,
      please create a comment about this in the plugin page: http://eggemplo.com/plugins/affiliates-groups/
      You can send me dashboard admin access to info@eggemplo.com and I’ll have a look to settings.
      cheers

      1. I have sent the admin info over and posted the comment on the other page.

        I was looking to try and implement that change today 1/1/2015.

        Thanks

        1. Thanks, answered here.
          cheers

  16. Hello, I need some urgent help.

    I had certain pages blocked using GROUPS plugin but decided to now open those pages to the public. But no matter what I try, the pages could not be viewed by unregistered user — they get 404 page not found error. So I deleted the restriction on each page (this didn’t work), so I deleted each capability and group (this didn’t work), so I deactivated the plugin (this didn’t work), so I erased all data in settings (this didn’t work).

    Finally, I just deleted the entire GROUPS plugin and that worked; unregistered users were able to view the pages. BUT, I need GROUPS plugin since I need other pages blocked. So I downloaded a new instance of GROUPS plugin again and activated it and that brought the 404 problem back. If I delete plugin, unregistered users can view pages fine but if I install a new GROUPS plugin, problem returns.

    This is driving me crazy. There must be some traces of the GROUPS and capabilities somewhere!

    How can I fix this? PLEASE?!

    1. To further expand on this, it looks like certain sub-directories are running into this 404 page not found error. For instance,

      http://www.site.com/courses/ – works totally find for unregistered users
      http://www.site.com/lessons/ – none of these sub-directory pages are displayed. Only 404 is shown.
      http://www.site.com/topic/ – this sub-directory doesn’t work either

      1. I also just tried to access these sub-directories as a register user and still got 404 error. Even registered users cannot see these pages!

        1. Okay, looks like I was finally able to solve this issue. Turns out there was traces of “groups-groups_read_post” meta-key being left in the WP database for my posts/pages even with the plugin erased completely. For future reference if anyone is having this type of issue, here’s what I did to fix it for my site:

          REMEMBER TO BACKUP WP and DB before doing this.

          1) With GROUPS plugin activated, go to dashboard menu > Groups > and check ON delete all groups plugin data upon deactivation.
          2) Go to plugins > deactivate groups plugin
          3) Delete groups plugin
          4) Go to PHPmyAdmin and in your WP database, erase (drop) all tables that are remaining named something like this WP_groups_xxxx (WP can be something else depending on your database name)
          5) Then, search the rest of your DB for this meta-key: groups-groups_read_post
          6) Erase all that have this meta-key assigned.

          This is how I erased all traces of the previous GROUPS plugin that was causing my site issues. After doing all that, I reinstalled GROUPS and everything was working perfectly after — no more 404 errors or page not found for basic pages.

          Hope this helps!

          1. Perfect 🙂
            thanks for sharing your solution !!

  17. Also, is Groups compatible with bbpress for forums?

    1. Give it a try, there are some hooks that bbpress defines which Groups also defines, but it can work depending on what your requirements are. Also note that there is Groups Forums which is an extension for Groups.

  18. Hi,
    Is it possible to have front-end users create their own groups, with the option of the admin approving on the backend, instead of admin having to create the groups.

    1. Hi, currently you can only allow them to join specific groups using the [groups_join] shortcode. It would be possible to derive one from that where you can have the user indicate the group name from a field, you would have to implement that. Thanks for the suggestion, I’ll take it into account.

  19. Do you have a way or a shortcode to display the names of the members of a particular group?

    1. Hi,
      I have created groups_users_list_group shortcode. You can add the code in yout theme functions.php file.
      cheers

      1. Thanks for the shortcode. Is there a way to display the picture of the user next to the name? And can the name be clikcable to his/her author page?
        Thanks in advance

        1. Hi,
          please have a look to get_avatar and get_author_posts_url functions.
          cheers

  20. I have a better question that can clarify what I am trying to do.

    I would like to do this:

    Affiliate:
    20% as the default referral rate
    3% on Level 1
    2% on Level 2

    Super Affiliate:
    40% as the referral rate
    6% on Level 1
    4% on Level 2

    The purpose of this is to encourage an affiliate to become a Super Affiliate and they do this by purchasing our product.

    As of right now I am doing this manually and it takes a lot of work on my part, I wanted something I can use to make this automatic, by assigning someone to this group Super Affiliate, it automatically will change the rates for them……

    Will this plug in help me accomplish this?

    1. Hi,
      if you are using Woocommerce Integration you can use Affiliates Groups plugin.
      To apply different commissions to levels, you need to enable “Level rates are relative” in Affiliates->Tiers, and recalculate percentages. E.g.
      Affiliate:
      Group ‘Affiliate’ value: 0.20 (20%)
      Level 1: 0.15 (15% of 20% = 3%)
      Level 2: 0.66 (66% of 3% (level 1) = 2%)

      Super Affiliate:
      Group ‘Super Affiliate’ value: 0.40 (40%)
      Level 1: 0.15 (15% of 40% = 6%)
      Level 2: 0.66 (66% of 6% = 4%)

      cheers

      1. I see where I can check the box that “Level rates are relative” but where would I go to input the %’s above?

        Do I do that in groups?

        1. Hi,
          in Affiliates->Tiers set the levels (in this case 2), click on Save. Then you should have the input text fields to set the rates.

          1. Sorry I now understand what you mean. When I look at the groups I created

            Super Affiliate
            Affiliate

            I do not see where to change the setting to 20% or 40% for the referrals.

          2. Just so you know I do not see this after I have installed the Group Plug In

            http://eggemplo.com/wp-content/uploads/2013/11/affgroups-setting.jpg

            So I do not see where I set the rate per group.

  21. I just downloaded the Groups Plugin. I have Affiliates Enterprise. Currently I have about 2200 Affiliates in my Database. I have a WP Capabilities setup putting them into 2 groups.

    Affiliate
    Super Affiliate

    Obviously Super Affiliates earn more money based on a certain criteria. When I activated this plug in, it did not pick up the WP capabilities groups I had already created. I understand that I need to assign people to the groups plug in you created under the regular wordpress groups.

    My issue that I am having is how do I….

    1. Give a default referral rate to the Affiliates group of 20% but give Super Affiliates a referral rate of 40%?

    1. Hi,
      if you are using Woocommerce Integration you can use Affiliates Groups plugin.
      cheers

  22. Hi there. Once I have let someone sign up for a group, is there a way to show which pages/content they have access to? In other words, I know I can display that a user is a member of the “Yellow Group,” but that’s meaningless, really, unless it also links to the page(s)/content their Yellow Group membership affords them. Is there any automated way to do this? The site for which I’m using it sells access to streaming videos, and there will be 40-50 groups when it’s completed.

    I’d love to provide a page with links to the videos for a signed-in user.

    1. Hi,
      you can use List Category Posts plugin.
      cheers

  23. Using Groups and Groups 404 redirect, If a visitor tries to access a page that is protected by Groups they are re-directed to the sign up/login page. After the visitor logs in, how can I have then re-directed back to the referring URL/original page they were trying to access?
    Any help would be appreciated.
    Thanks

    1. Hi,
      maybe there is a plugin/theme conflict. Please share the url to have a look.
      cheers

  24. Hi,
    Can you please let me know if I can achieve the following using the Groups plugin (and probably the Groups Restrict Content Categories extension)?
    I’d like to create a public website and have some restricted content that’s accessible after registration and logging in. Registered users will be grouped by ‘organisation’ AND by ‘program’, i.e. they need to belong to more than one group (e.g. Organisation-A, Organisation-B and Program-1, Program-2, Program-3). Each user would be part of ONE organisation group as well as ONE program group (e.g. Organisation-A and Program-2). I’d like to restrict access based on both grouping criteria and also REDIRECT users to different pages based on the groups they belong to on log in. I’d probably create separate pages for each combination and most likely I’ll only have pages, but no posts in the logged in area.
    Logged in users should be able to comment on certain pages and they may need to be able to upload files (Word or PDF docs).
    Further to this, I don’t really need / want users to have access to their profile or the profile of other members – basically they shouldn’t see the WP admin area at all (but this may not be related to the Groups plugin).
    Please let me know if I can do the above with the Groups plugin (and any extensions I may require).
    Thanks,
    Peter

    1. Hi Peter,

      Currently you can restrict by group capabilities, I’d suggest you try out the combinations that you intend to use taking into account that you can’t directly say “restrict access to this post based on group membership with groups A and B”.

      Regarding the redirects, with Groups 404 Redirect you can redirect to a common page, it doesn’t support combinations like the ones you suggest. You’d have to derive a customized version for that.

      Profile restrictions related to the back end aren’t controlled by groups, you’d need to use an additional plugin for that.

      Cheers

  25. Is there a way of hiding most of the roles shown in the Groups? I don’t need most of the WP stuff as all I’m doing is assigning specific groups to specific pages of content. Surfing through the seemingly endless lists of capabilities is not much fun, so if there’s a way of hiding some, that wold be wonderful!
    Sorry if this has been addressed elsewhere on this page, but I’ve spent a long time scrolling through questions without seeing anything like this.
    Thanks

    1. Hi Nigel,

      Groups doesn’t work with roles, you can’t hide any roles with it. Regaring the capabilities, you can use the filters on top of the admin section and it will limit the results displayed to those matching.

      Cheers

  26. Hi,

    Thanks for the great plugin.

    I am having a problem protecting a BuddyPress generated page. /members

    I am using:
    Groups
    Groups 404 Redirect
    Groups for WooCommerce
    WooCommerce
    BuddyPress
    bbPress

    I have successfully setup groups such that it is protecting pages. For example, I have one group (no_one) which only administrators belong to, that is successfully protecting the page /blog.

    For some reason it does not protect the /members page.

    Any thoughts on what I am doing wrong or a possible solution?

    Thanks for the help!

    1. Hi Michael,

      I’m getting the same thing on a test site, it seems that the Members page does not ‘go through’ the normal WordPress loop to render its content and the access restrictions are bypassed. The page content is rendered using this file, maybe you can override that in your theme or use one of the hooks to provide alternative content for those who are not logged in?

  27. Hello,
    When I activate the “Groups” plugin, I get a Links menu which appear in the admin bar.
    What’s this for? For external links ? I don’t know what this menu deals with “Groups” plugin.
    I can’t find any documentation.
    Is there a widget to display these links in a widget?
    Anybody could help me please?
    Cheer.

    1. Hi,

      Go to Groups > Options and uncheck Administrators override all access permissions derived from Groups capabilities. and hit Save, now visit your dashboard and the Links menu won’t show up. See Links Manager.

      Cheers

      1. Thank you Kento,
        but does this feature useless?
        I don’t understand how to use it.

        1. It’s an outdated feature that’s built into WordPress.

          1. OK,
            so why does it shows when Groups is enabled?
            Do you think in a next update of Groups, the menu “Links” won’t show at all?

            1. It shows because of the admin override, if you disable it it will disappear.

    2. Hi @Kento I have an issue with this plugin, when user login with given credentials then wordpress admin bar appears on top and they can access all affiliates plugin options from admin panel.

      any one help me?

      Thanks & Regards

      1. Hi Sahib,

        You are posting this in the comments section for the Groups plugin but I’m not sure if you are using both Groups and Affiliates in your setup. If you are using Groups and have additional group capabilities assigned, then you should review those and reduce them. If not, then you might have opened up administrative access by error and should remove those capabilities from the roles that should not have access. See the section under the heading “Permissions” on http://docs.itthinx.com/document/affiliates/setup/settings/general/ for details.

        Cheers

  28. I am using the woocommerce groups plugin and was curious if I could link different groups to different variables within one product?

    If anyone knows, it would be very helpful. Otherwise, this plugin is working great.

    Thanks!

    1. Hi Ashley,

      Currently not but could you provide some details on that?

  29. Hi – we are using groups in conjunction with WooCommerce Sensei and BBpress. We are having a problem where the forums in BBpress that are protected with Groups work just fine, then randomly, certain forums members can only see the sticky posts, but nothing else. The fix is to set the permissions on the forum to public and then immediately back to private. This seems to clear the problem, but we cannot isolate what is causing that. Looking to see if this is within Groups and how to prevent this. Any ideas?

    Thank you,
    Chris

    1. Hi Chris,

      Do you have a testing version of the site with debugging enabled to have a look? Another option would be to use Groups Forums instead, although I’d be interested to see why this is happening on your site using bbPress so we can solve it for that combination with Groups. If you can give access to the testing site please forward credentials to support at itthinx dot com with a link to this conversation.

      Cheers

      1. Hi – sorry for the very long delay in getting back to you. This is still an issue. Yes we have a staging site that I can give you access to. It is an exact replica of our main site. Please email me directly and I can send you the credentials.

        1. Hi Chris,

          Thanks, I’ve mentioned an email in my previous reply where you can send the access details to.

          Cheers

  30. Hi Kento,

    I quite confuse on the rule:
    [groups_non_member]
    You need to register or log in.
    [groups_member group="1,5"]
    registered message content.
    [/groups_member]

    On “You need to register or log in.” phrase, Can we hide this message after they sign up or log in?

    thanks,
    Ron

    1. Hi Ron,

      You’re missing a closing shortcode tag on that. It would be:

      [groups_non_member]You need to register or log in.[/groups_non_member] … followed by the rest.

      Cheers

  31. Great work on the Groups Plugin Kento!

    I’m trying to put together a proof-of-concept where I’ve got Windows Azure Active Directory (WAAD) users coming into an Azure hosted WordPress site (using Auth0.com to hook up the authentication and profile information).
    I’ve got that much working OK, I’ve got your Groups plugin installed, but I’m keen to find a way to map the Auth0 group membership information onto the groups I have set up in the Groups plugin.
    Ideally something simple like: If a WAAD user is a member of a WAAD group of the same name as a WordPress Group, then automatically give them membership in the WordPress Group.

    I know WordPress is already sucking various bits of user profile information out of the Auth0 user profile, so the groups property must be accessible.

    Is this doable?

    Thanks
    Craig

    1. Hi Craig,

      Many thanks for the praise 😉

      I assume you’re using the Auth0 plugin – it has a method insertAuth0User(…) which adds auth0_id and auth0_obj to the user. If you hook on the user_register action you can check the user object and assign the appropriate group as shown in the Examples.

      I hope that helps, Cheers!

      1. Thanks Kento. It’s my first dive into modding WordPress, but I’ll see if I can figure it out.

        I’m thinking of attaching it to wp_login since group memberships could change on a daily basis.

        I’ll post the solution back here if it’s not too complex.

        1. Thanks Craig, it would be great if you can share your solution, might be useful for others, too 🙂

          1. OK, I’ve figured out the code (see below), but I’m just struggling to get it firing during the WordPress login process. I’m trying to get help from the Auth0 forums, as there’s suspicion that Auth0’s login is taking over the entire login process, so the WordPress add_action(‘wp_login’,…) never fires.
            In the mean time, I have it running successfully in the footer.php file 🙂 It probably needs session flag so that it doesn’t run on every page load, just the first time for a session.

            Please excuse the formatting, it’s a bit of a jumble.

            (edited – code moved to this Gist Craig’s Auth0 integration with Groups)

            1. Great, I’ve moved the code to this Gist, if you’d like to update it with the changes necessary for the login process or share it as a plugin?

  32. Hi, very cool plugin!

    I’m trying to create a frontend UI that allow registered user to create new group.
    Any suggestion about where to start?

    Thanx in advance

    1. Hi Andrea,

      You would use the create method of the Groups_Group class. You can find links to additional information and code examples on the API documentation page.

      Cheers

      1. exactly what I was searching for

        thank you

  33. Hi, love this plugin. I have one question: is there a way to give a standard “access restriction” for all types of posts (post, page, media, package), so front-end uploaders don’t have to putt it in manual and they won’t forget to set these “restricions”.

    Greets,
    Dennis

    1. Hi,
      you could create your own action when a post is saved, e.g.:
      add_action( 'save_post', 'my_save_post' );
      function my_save_post( $post_id ) {
      add_post_meta( $post_id, Groups_Post_Access::POSTMETA_PREFIX . Groups_Post_Access::READ_POST_CAPABILITY, 'your_capability' );
      }

      If your add this code in your functions.php file and change ‘your_capability’ to your capability, this should work fine.
      cheers

      1. Hi,

        Thanx for your quick responce. Would that also work if I wanted to use this with a custom post_type?

        Cheers,
        Dennis

        1. This should work fine with custom post type, please have a look to the WordPress API.
          cheers

  34. Hi there,

    First thank you and congratulations for the great Groups plugin! I have enjoyed using it to protect pages “by hand” for groups of users through the ultra-simple UI you provide in the WP backend. But I have now to go a step further by doing things programmatically in php templates and I am afraid I need some advice.

    What I was conveniently doing by hand was, for a set of manually create pages :

    – define both a pair group-capability to protect the pages
    – assign users to this pair for them (only) being able to read the pages

    I now have to do the same in php for a set of pages created programmatically. I understand how to do the second step (assign users to group) thanks to the Groups_User_Group::create class. But I am lost in the API for achieving the first step, which I understand should result in a list of several sub-steps like:

    – creating a group
    – creating a capability and pairing it with the group
    – protecting the pages with the group/capability pair: is it just filling up a groups-groups_read_post custom field?

    I am rather a beginner than an expert in php. Do you have some code examples to help me out? Or some more precise advices on how to use the API for achieving these steps?

    Many thanks in advance!
    Yves.

    1. Hi,
      – Creating a group: Groups_group::create (you can see an example in groups/lib/admin/groups-admin-groups-add.php line 154).
      – creating a capability and pairing it with the group: Groups_capability::create and Groups_group_capability::create (you can see the use in groups/lib/access/class-groups-access-meta-boxes.php around lines 420)
      – Protecting the post: Groups_Post_Access::create (you can see the use in groups/lib/access/class-groups-access-meta-boxes.php around lines 455)
      cheers

      1. Thanks a lot Antonio for the clues, it looks very helpful, I will investigate all of that!
        Cheers,
        Yves.

        1. Success! Thanks Antonio, the code was clean and well commented, so no problem to achieve what I needed!
          Cheers,
          Yves.

          1. Perfect 😉

  35. Hey there..

    I use your Enterprise version for Affiliates. Good Job guys! Pretty well-coded, no issues with other plugins!

    I´m really interested to purchase Groups for WooCommerce and your Subscriptions-Extension, but from an earlier question I know that they are not compatible with bbPress and BuddyPress.

    But this is exactly what I need…

    Here is my Question now: I use also the WooCommerce extension named: Product Support.

    This extension gives the possibility to create a bbPress-forum or a BuddyPress-Group just for customers that purchased a special product.

    If it is possible to combine this extension with your subscriptions-extension, it´s a big solution for monthly-membership-groups with BuddyPress.. Do you know anything about this combination?

    I´m sure it´s possible to open a group on this way, but it is possible to close them automatically if the subscription is ending?

    I know it´s a third-plugin solution, but I think it can be a big deal for you to cooperate with this plugin-author.. It´s from woothemes, too..

    Thanks for your response : )

    Cheers

    1. Hi Bruno, many thanks and also for suggesting the extension. In fact there is a solution based on Groups and Groups Forums http://www.itthinx.com/plugins/groups-forums/ (also have a look at its docs please). I’m interested to hear if that combination would work for you.

  36. Hi and thanks for the plugin!

    1. Is there a way for a user who is not the Admin to create a group inside my wordpress website environment (By clicking a button like “Create A Group”) and manage it?

    Yuval

    1. Hi, thanks for the suggestion, currently it’s not possible but added as a feature request along with other fine-grained access restrictions.

      1. Thanks kento for the quick response!

        Basically I have a wordpress site with Marketify Theme and EDD plugins, and I want logged in users to be able to create their own groups where the members of such a group can upload content that will be available or cost-free only for the group members.
        What do you think? will your plugin will be compatible with my requirements?
        If your Plugin is not what I’m looking for, can you suggest other plugins that could match my site functionality?

        1. Hi Yuval,

          You could build something like that with Groups using its API, but I’m not aware of an OOTB solution based on plugins only. Also I would rather recommend WooCommerce as the basis for such a setup and have a look at the Product Vendors plugin.

          Cheers

          1. Ok Thanks! It looks like this plugin could help!

  37. Hi!

    I want to sell subscriptions with WooCommerce + Groups, but I need the drip feed functionality.

    It is possible to have this functionality in some way with the Groups plugin?

    1. Hi,
      if you want to sell subscriptions, please have a look to Groups for Woocommerce.
      cheers

  38. Hi, hope ya’ll are swell!

    I want to hide pages from my registered subscribers, the pages should not appear in the menu, is there a capability that non-subscribers have that I can configure in the Access Restrictions meta box, or, is there a way to create a group that all non-subscribers will automatically be associated with, then I can create capabilities for them and use those in the Access Restrictions meta box?

    🙂

    1. Hi,
      sorry, you can’t do it with metaboxes. Please have a look to this conversation.
      cheers

      1. Thanks Antonio

        Menu Item Visibility Control didn’t meet all our requirements for a multi tiered subscription site using WooCommerce, but thanks, I’m sure I will use that on a simpler site.

        We ended up, well my dev actually :P, ended up writing a rule to exclude all group access restrictions for logged out users. Thankfully it wasn’t much trouble, I was just trying to see if perhaps I could save him the time.

        Where is the best place to share a snippet for other people?

        Kind regards,
        Iggi

        1. Hi,
          you could use pastebin.com and share the url here.
          thanks 🙂

  39. Here is a note that may be helpful to others.

    I saw some advice elsewhere recommending the use of htaccess to enable browser caching. I tried it, but it understandably appears to interfere with Groups, as the cached page shows up in the browser, rather than the one Groups wants to show after the user has logged in/logged out.

    1. thanks for sharing 🙂

  40. Hi Kento – disregard the last. Re 1, ideal requirements would be options within the plugin settings to control whether this applies to single post pages only, setting for a custom 404 login page URL to be setup (something with ‘login to read article’, which then redirects them to their desired article after login), and re 2) the fixes in 1 might suffice, but it’d be awesome to allow excerpts, excerpt length and featured image still being displayed (or other content if featured image replaced by youtube thumbnail etc). Thanks for your help! This is a great plugin and with more features like above, I’d happily pay for it.

    1. Hi Mike,

      Re #1 have you seen http://wordpress.org/plugins/groups-404-redirect/ ? This should cover what you describe …
      #2 As it currently is, we can’t do this via the administrative user interface and though it is possible to control these aspects through theme templates using the API, to have complete control over it (protect excerpt or complete post only, control attachments etc.) without any need for coding would be awesome.

      Many thanks for providing your feedback on this, I’m certainly going to take it into account and also appreciate the suggestion for a paid version. I don’t have any plans on converting Groups into a paid plugin but there also is the need to support it in a sustainable way through paid extensions, so I think it could make sense to offer an extension with a more fine-grained control. The categories and comments extensions for Groups already fit into that category, at some point it might even be interesting in offering a tool that combines them.

  41. Hi, great plugin but when I put a post on restricted access (restricted to specific group names), it doesn’t show up anywhere on blog archive pages, search pages etc. It’s effectively hidden. Can you share how to:

    1) make all posts show titles, featured image, excerpts (programmatically, not shortcodes) even if restricted access is enabled
    2) anything needed to do to ensure all content (even restricted posts) can still be crawled for seo rankings

    Thanks heaps.

    1. Hi Mike,

      #1 See the Groups_Post_Access class for filters used please. You can modify/override these according to what you want displayed. If you are going to do that, it would be great if you share your findings, I’d be interested in even enhancing Groups to incorporate some of them – if you have ideas around the requirements we can discuss them.

      #2 What’s protected really isn’t visible but allowing excerpts and maybe reduced content for protected content would be an option?

      Cheers

      1. Thanks for the ideas Kento. I’m a rookie programmer, so not sure how to do this. Hopefully is someone else figures this out, they can post here also. Cheers

      2. Hi Kento – just trying to interpret #2 above again. For example, on a blog with 100+ posts and previously good click-through rates from google… if we use Group controls… we understand all of that search optimised content would then instead be ‘hidden’ from google… so it could cause a sharp decline in impressions and website visits. When you say ‘what’s protected isn’t really visible’… is that the kind of impact you mean? If there’s any way to solve this major issue, so we can still have all the ranking power, but somehow protect access to human readers (versus search engines) when they click on posts, that would be amazing. Thank you!

        1. Hi Mike,

          You could actually use conditional blocks [groups_member group="Premium"]Premium content within the post ...[/groups_member] to enclose the main content, i.e. leave the posts unprotected which would also leave the excerpts fully available, but enclose the content in a post within a conditional block.

          That way you retain the posts visible but only hide the extended content from those who are not authorized. I hope that helps 🙂

    2. Hi Mike

      @1
      You could actually this with a few lines of code in your functions.php, see more here: http://xd3v.com/bypassing-groups-restrictions/

      @2
      I’ve suggested a little plugin/extension above: http://www.itthinx.com/plugins/groups/#comment-418308 where the access restriction is removed from the post after X days (maybe based on group type, so that som group types is locked down X days and another group is locked down Y days). I think that would be a fantastic feature.

      Regards
      Thomas

  42. clementp Avatar

    Hi,

    Thank for your plug-in. Can you help me to understand if we can use a “capabilitie” which says : “see and download digital product from a woocommerce shop” ?

    My goal is taht a user from one group can see products like all the users but can see too a button to downlad digital files .

    Best regards.

    Clément

    1. Hi Clément, please have a look at the documentation of the Groups File Access extension. I think that will be helpful for your case.

      1. clementp Avatar

        Hi Kento,

        Thank your for your anwser. I think I will try this.

        Regards.

  43. Thanks for the hints. Still not quite what I had in mind (I wanted to force different categories depending on the group) but I can probably adapt one of these somehow. Appreciate your help!

  44. I’m configuring this plugin currently, and so far it’s working out okay for me. However, one thing I can’t seem to figure out: how do I restrict access to the feeds? If unauthenticated users navigate to links like:

    `http://localhost:8000/mysite/comments/feed/`
    `http://localhost:8000/mysite/feed/`

    They still get to see the content. Or is this something my theme (GeneratePress) should be handling? In any case, I can’t seem to find any place in Groups, GeneratePress, or WordPress itself to secure or disable the feeds.

    Any comment would be appreciated.

    1. Hi,
      feeds should be automatically filter (showing only the post not restricted).
      Be sure you aren’t logged in when you see the feeds.
      cheers

      1. Thanks for your feedback.

        Alas, perhaps it _should_ automatically filter, but it doesn’t. I logged out and then even used a fresh private browsing session to verify: links such as http://www.xyz.com/wpress/feed/ would still list posts. Note that I was using latest WordPress (4.something).

        I ended up using this workaround: http://wordpress.stackexchange.com/a/162833/24226

        1. Maybe a conflict with your theme or another plugin (we will consider it)
          Thanks for sharing the code 😉
          cheers

  45. I installed groups and it’s pretty clear how to let users post restrictions etc.

    Is there a way for users in a group to have their posts automatically restricted according to their group, or is there some other way we can set things up so certain specified users can easily view the posts of others belonging to a specific group (say by a group filter on the posts admin page?)

    Thanks

  46. I wonder how I can use groups shortcode for hiding one tap depending if user is in group or not?

    this is my code but it didn’t work for me.

    [groups_member group="Developer"]
    <li class="fa fa-barcode fpd-tooltip" title="” data-target=”.fpd-barcode”>

    [/groups_member]

    1. Hi there, yes that code is correct – what part doesn’t seem to work in your case?

  47. Hi,

    I wonder if Groups would have conflict with another plugin “Capability Manager Enhanced”, because I’ve installed “Capability Manager Enhanced” to my WordPress.

    Thank u!

    Ben

    1. Hi Ben,

      Have you seen anything that would indicate a conflict? If yes, some screenshots and details would be great.

  48. Hi.

    I have 2 questions:
    1. after setting GROUPS_READ_POST to page all is ok, but when delete this from same page this filter is still ON !? What to do rather than disable plugin than page shows in menu again ?

    2. 404 redirect does not work if plugin W3 TOTAL CACHE is on … just first redirection is ok, but after that enter address of page again and it is shown and is menu again …

    Would like to buy File access but must set this working first …

    Thanks,
    Matjaž

    1. Hi Matjaž,

      #1 If you change the permission and have object caching enabled it might be necessary to purge the object cache. You don’t need to disable the plugin.
      #2 Please check the following settings: Under Performance > Page Cache the option Cache 404 (not found) pages should be disabled and Don’t cache pages for logged in users should be enabled.

      Let me know if that helps please.

      Cheers

      1. Hi, and sorry for long response 😉

        #2 before the Cache 404 (not found) pages was disabled and Don’t cache pages for logged in users was enabled. After Don’t cache pages for logged in users was disabled this problem never came up again. Problem solved 🙂 ( so both should be DISABLED )

        #1 is not related to W3 plugin. Even when W3 total cache was disabled, I still can not see page that had GROUPS_READ_POST and then removed … I can show this page to public now only if I disable Groups plugin 🙁

        What to do next to show this page to public again ?

        Thanks

        1. Hi, probably you have a deleted capability restricting access, that’s a pending issue with the internal protection. I would create the page as a new one and delete the one that is not viewable.

          1. Thanks, Kento.

            This is what I have done and it is working ok.
            THANKS.

          2. Found the solution: you just need to delete custom field of the deleted capability that is restricting access. It stays in the page / post if capability is deleted.

            1. Thanks for the update on that, I’ll take that into account as well.

      2. Hello again.
        I’ve made new page that have problems with the same url name and same context and the problem still persists. When I activate Groups plugin this page is not visible to public – even new one. Please help what to do, this is not the page that needs to be hidden from public.

        Thanks.

        1. Hi, you most probably have access restrictions in place. Log in as an admin and make sure that the page isn’t protected.

  49. (previous post seems to have vanished?)

    I have a website in which students are organized into groups, each of which is assigned to a teaching assistant. I’m trying to figure out a way that teaching assistants can get a list of posts filtered by student group, without the students having to self-identify via tag or category (they tend to forget to do this).

    Is that possible with this plugin?

    Thanks

    1. Hi Karl Jürgen,

      (it was in the moderation queue)

      Rather than using groups to filter the posts, you would use categories. Groups is used to restrict access to content, but from what you have explained, you simply need to classify the posts.

      Cheers

      1. Yes, sorry–somehow things didn’t show, then did after I’d reentred. Odd.

        Ok–so can’t do that with groups, that’s strictly restrictive. Pity–would be a good feature.

        We are in fact using categories to do that; the problem is, the initiative is on the user to identify the category and being students they often forget. If one could force a category by user…. I will look for that.

        Thanks for the reply!

        1. Hi, I’ve done a quick search on that: wordpress force category by user – there are a few interesting links right on top 🙂

  50. I’m running a class which has students in a number of tutorial groups, each run by a TA.

    I can see how to restrict access to one group or another at post time, but is there a way to let a TA filter posts by specific group? I.e. a TA might like to see a list of posts within lab #1 or lab #2….

Leave a Reply

Your email address will not be published. Required fields are marked *

Share