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,679 Responses to Groups

  1. Michael August 14, 2013 at 9:40 am #

    Thanks very much for your prompt response. My site admins – who are neither patient nor particularly tech-savvy – just need a means of contacting their various groups with short, one or two line messages from time to time. Permissions and the ability (of users) to opt in/out etc are not issues on this site. Reading through the description of Groups Newsletters, it initially seemed to me that it offered many facilities and options which we probably wouldn’t use, but that those might detract from ease-of-use. In view of your comments, I’d be happy to give your plug-in a try – what do I do next?

    Kind regards
    Michael.

    • antonio August 14, 2013 at 10:10 am #

      Hi, you can buy it in Codecanyon.
      cheers

    • kento August 14, 2013 at 10:35 am #

      @Antonio I offered him to try it out before deciding to buy it there!
      @Michael I’ll give you access.

  2. Michael August 13, 2013 at 3:11 pm #

    Looking through these comments, I see plenty of people interested in a way of emailing their groups. I wondered if you had considered an integration with the ‘Email Users’ plug-in found at http://michaelwalsh.org ? I’m aware of the Groups Newsletters plug-in, but this is really overkill for what I want to do.

    • kento August 13, 2013 at 4:33 pm #

      I created Groups Newsletters precisely to cover a wide range of applications related to distributing information to group members, including the very basic sending out emails to groups. So I wouldn’t really be interested in the extra effort to do an integration with another plugin myself. Would you like to try Groups Newsletters? I’d appreciate the feedback and you can decide to get the license after that. It certainly isn’t overkill for mailing group members, although it’s very flexible 😉

  3. Greg August 11, 2013 at 2:27 pm #

    Thank you, the Groups 404 plugin is going to solve a major problem for me.

    About the shortcodes, I’m sorry but I didn’t understand how to proceed.

    I’d like my customers to find a list of the links they have access to in their Woocommerce account.

    Currently, they can see what they bought with a link to the product page but what I’m selling is the access to a specific page where they can see a specific video streaming.

    This is that specific page I’d like to show to them. I’m selling different ones so their can be multiple links.

    For now, they are receiving the link by email but some are complaining it’s not very convenient to have to go through your emails to find the link each time you want to look at the video.

    I have to agree with them.

    I hope you can help me.

    Thank you so much for the great job you’re doing !

    • antonio August 12, 2013 at 7:58 am #

      Hi,
      if you sell access to group “VIP”, you can create a capability for this group (for example view_videos_vip) and assign it to this group.
      When you create your private posts (…/video1 …./video2 …), add this capability.
      In your user profile page, you can create links to this posts, and only VIP users will can see.
      cheers

  4. Greg August 9, 2013 at 12:32 pm #

    Hello,

    In the beginning I contacted Woothemes support for that matter but they said it was related to your plugin, not their’s. They told me to contact you instead for support.

    I hope you can help me.

    I just bought Groups for Woocommerce and set it up. My main issue is I didn’t find a way to custom the denied access page.

    I’d like to be able to customize the page for each group to invite potential customers to purchase the corresponding access to the content.

    How do I sell memberships with Groups for Woocommerce
    with no way for my customers to find the content they bought ?

    Thank you.

    • kento August 9, 2013 at 4:49 pm #

      Hi there,

      You can use Groups 404 Redirect to head them over to a page where you indicate alternative content when someone tries to access a protected page.

      And for those who have purchased membership, you can set up content using the shortcodes. For example, when a member is accessing the page you can use that to show links to protected pages.

      I hope you will find that useful.

  5. Sylwia August 9, 2013 at 11:44 am #

    Hi,

    is it possible to create a special type of groups? I’d like to have three types: Family (only a parent could create this kind of group and add their kids there), Class (created by teachers), Training (created by instructors). How do I go about it?

    Thank you in advance!

    • kento August 13, 2013 at 11:19 am #

      Hi Sylwia,

      You would probably create three groups and use one or more capabilities assigned to them. Then use the capabilities to protect the content accordingly and assign the users to the appropriate groups. The FAQ section has an example.

      Cheers

  6. Josh August 9, 2013 at 6:29 am #

    We have a small newspaper site and I am trying to use Groups and am running into a difficulty. With a basic install using just the Registered group with the capability of group_read_post the posts show up just fine on the homepage for registered users. The issue comes into play with non-registered users – they don’t see the post at all on the homepage once I click the box in an individual article’s Enforce Read Access box. No headline, no excerpt, nothing. It’s as if the post doesn’t exist.
    I would like to have the post and automatically generated excerpt show up still but when the non-registered user clicks to read the article it goes ahead and redirects them.
    The only way around this I’ve found so far is to use the short codes
    [groups_member group="Registered"]
    Article text here….
    [/groups_member]
    [groups_non_member group="Registered"]
    Please go to sign up link here
    [/groups_non_member]
    Doing that and then using the excerpt field I can bring the post back to the homepage but it is VERY time intensive to setup each article we post that way and when non-registered users visit the article everything that loads after the short codes is rendered in a typewriter like font.
    Is there any way to achieve the behavior I am looking for where all the home page info stays visible and as is to non-registered users but yet still protected when they click on any of the articles and are redirected to a signup/purchase page?

    • antonio August 13, 2013 at 8:43 am #

      Hi,
      if you want that users can access to a post/page, but show content only when they are registered, you must use shortcodes.
      If you want that users can not access to a restricted post/page, you must use capabilities.
      With Groups 404 Redirect you can redirect non registered users to a signup/purchase page.
      cheers

    • Joey August 16, 2013 at 5:35 pm #

      @Josh

      I ran into the same issue you describe and came up with a solution. I published a tutorial on the process and the link is below. Note: the tutorial is a follow-up to a previous tutorial; although, the solution should still work in your setup.

      The basic premise is that you remove the Groups restrictions for certain pages on your site, such as the home page.

      http://xd3v.com/bypassing-groups-restrictions/

  7. Ali aGHasizadeh August 5, 2013 at 8:18 am #

    hello,
    first of all thanks for sharing such a great plugin.
    I have 10 groups and want to users can select their group. Is it possible?
    thanks in advance

    • antonio August 5, 2013 at 2:04 pm #

      Hi,
      you can add this permissions in Groups->Options->Permissions (for example to Editors). And check “Show groups in user profiles.”.
      But beware this allows users can create/delete/edit groups and capabilities.
      cheers

  8. Norman August 2, 2013 at 4:25 am #

    Groups 1.3.11 has a bad conflict issue with OptimizePress2. There appears to be something happening that blocks Javascript from executing properly and Groups is definitely the plugin conflict. Would someone please be so kind as to look into this?

    Issue: With Groups activate the Live Editor in OP2 fails to update after changes are made. Elements from the live editor vanish (instead of re-post with the updated version) as a result of some conflict between this plugin and that theme and/or plugin.

    • kento August 2, 2013 at 9:21 pm #

      That doesn’t sound like something Groups would do:

      There appears to be something happening that blocks Javascript from executing properly and Groups is definitely the plugin conflict.

      Do you have any debugging info that might support this assumption? Also, have you tried asking the makers of OP2 about this?

  9. Kirsty August 1, 2013 at 11:18 am #

    I have just been updating a client site to use WP 3.5.2 and the latest version of groups but this is now the error I get once the updates were complete on the staging site.

    Fatal error: Call to undefined function wp_get_current_user() in C:\xampp\htdocs\flexiant\wp-includes\user.php on line 209

    All other plugins are fine and I disabled all the remaining ones to narrow it down to the groups plugin. Is this something anyone else has experienced when updating to WP 3.5.2 and Groups 1.3.11

    Thanks

  10. Joey July 30, 2013 at 12:20 am #

    Just FYI – xd3v has published an in-depth tutorial on creating a social network with Groups being a key ingredient. Hope someone finds it useful.

    http://xd3v.com/create-a-premium-social-network-with-woocommerce/

    • kento July 30, 2013 at 11:09 am #

      Thanks Joey, I’ve just read through the parts related to Groups and I think this is a very useful example. Great stuff!

  11. Richard July 27, 2013 at 10:02 pm #

    Hi

    Is there any way to use capabilities to achieve the following? I have a membership group that have access to a set of blog posts, that are otherwise protected. I want non-members to see the posts exist but not the content, i.e. to see tasters. On clicking the tasters I would like the non-members to be forwarded to a sign-up page for the membership group, so they can then get access to the full posts. I tried using groups_read_post, but it hides protected posts in their entirety from non-members.

    I would like to use capabilities rather than shortcodes, because I believe doing so would save me from having to put shortcodes in every post I want to protect.

    Thanks.

    Richard

    • antonio July 31, 2013 at 10:21 am #

      Hi,
      with Groups 404 Redirect plugin, you can redirect non-members to a post.
      cheers

      • Richard Tandoh August 18, 2013 at 2:07 pm #

        Thanks for the response.

        Groups 404 Redirect works for the redirection, but it does not help with the tasters/teasers.

        Would it be possible to adapt Groups – or maybe there is another way, say, via a custom capability – to show the title (and excerpt) of a post to all, but only the full post to members?

        Thanks.

        Richard

        • antonio August 21, 2013 at 9:56 am #

          sorry, you can use [groups_member] and [groups_non_member] shortcodes, for example:

          [groups_non_member group="Premium"]
          This text can only be seen by non-members
          [/groups_non_member]
          [groups_member group="Premium"]
          This text can only be seen by members of Premium group
          [/groups_member]

          cheers

  12. bassem July 24, 2013 at 11:53 am #

    Does Group provide a widget or shortcode for website visitors to register as two different/separate roles (affiliates or subscribers)
    and for the administrator to approve those registrations and grant access accordingly ?

    • kento July 26, 2013 at 8:25 pm #

      Groups doesn’t work with roles, one of the motivations for its creation was to be able to overcome roles 🙂

      The way this works (very simplified) is that registered users can be assigned to any set of groups, where their group membership can then be used to restrict access to content.

  13. Thailand Phuket Motels July 23, 2013 at 9:04 pm #

    After I initially left a comment I appear to have clicked on the -Notify me
    when new comments are added- checkbox and now every time a comment is added I get four emails with the exact same comment.
    There has to be a means you can remove me from that service?
    Appreciate it!

    • antonio July 24, 2013 at 5:29 am #

      Hi,in the email, you have a link to unsubscribe from notices. regards

  14. Andrus July 23, 2013 at 11:00 am #

    Hi, great plugin, many thanks!
    But i cant resolve 1 problem.
    I have woocommerce, there are products whitch shows only to a group (products hidden for not logged guests), it works great!

    Can i make group for non-logged guests with other options?
    Need to show other products to non-logged users but hide it from logged users.

    Regards.

    • kento July 26, 2013 at 8:52 pm #

      Thanks for using it 🙂

      You could work with the Groups API within the product template and the product category template to check whether a visitor is logged in and belongs to a group, then show content based on that.

  15. Jon July 18, 2013 at 6:11 pm #

    Currently I sell movies via download. I also wish to sell a rental movie for 24hr period at $2.99. I use woocommerce.

    Could I use groups woocommerce and set up a ‘rental group’. Each movie would be a ‘rental group product’ with a price $2.99. I set a time period of 24hrs for this product (movie). I then set up a restricted page that holds the movie player.

    So for example user buys ‘movie ABC’ and pays $2.99 at checkout where he becomes a member. He then receives the email with a link to the restricted page that holds ‘movie ABC’. After 24hrs his membership expires – the ‘rental group product’.

    Can this work? Thank you.

    • Jon July 19, 2013 at 11:55 am #

      I have this almost setup – not tested yet. The product which is a movie is essentially the membership for 24hr period. Customer buys ‘movie’ and gets a url to view the restricted page where the player resides.

      Having trouble getting the url to be issued to the customer though.

    • antonio July 22, 2013 at 3:35 pm #

      Hi,
      you can use Groups Woocommerce for this purpose.
      Create a group for each movie, and sell access to those groups (in edit product page you can setup duration to 1 day).
      regards

  16. romnatt July 18, 2013 at 5:10 pm #

    Hello
    User GROUPS plugin, I’d like to know if there is a way to send an email to groups via the backoffice site.
    I find this very interresting use.
    Essemble targeted newsletters or promotions dedicated to groups

    Regards

  17. Lee July 17, 2013 at 6:25 pm #

    Hi there! Great plugiin – one quick question:

    Once my members login and navigate back to the site, they are having to refresh the page to see the protected content. Any way to force the page to refresh without the members having to do so manually?

    Thanks!

    • antonio July 18, 2013 at 8:44 am #

      Hi,
      when you pressed back button, the browser tries display it out of the cache, which is much faster.
      Maybe Peter’s Login Redirect plugin can help you prevent users use the back button.
      cheers

  18. streetdirectory July 15, 2013 at 8:46 pm #

    When I originally left a comment I seem to have clicked
    the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I recieve 4 emails with the exact
    same comment. Perhaps there is a means you can
    remove me from that service? Thanks a lot!streetdirectory

    • antonio July 16, 2013 at 5:38 am #

      Hi,
      in the email received you have a link to unsubscribe to notifications.
      cheers

  19. Kurt July 12, 2013 at 7:24 am #

    You’re welcome and thanks for the reply!

  20. Marianna Muscat July 11, 2013 at 5:22 pm #

    Good Day

    I would like to use the plugin, but the moment I activate it on the website – http://www.africalegislation.com then I cannot get into the Admin section anymore.

    I see the WordPress banner at the top indicating that I am signed in, but the moment I click on any of the admin actions then it takes me automatically back to the home page of the website. I am on wordpress 3.5.2.

    The plugin is currently deactivated.

    I would just like to know if you have any ideas on how I can resolve this issue?

    Thanks!
    Marianna

    • Marianna Muscat July 12, 2013 at 8:13 am #

      Good Day

      You can ignore as we found the problem in our theme. Once we fixed this the plugin started to work

      Regards
      Marianna

      • antonio July 12, 2013 at 8:49 am #

        Hi,
        I’m glad that works fine.
        cheers

  21. Kurt July 10, 2013 at 1:20 pm #

    Hi there!

    Love the plugin! Is there anyway to bulk upload groups or capabilities with a CSV file?

    • kento July 10, 2013 at 10:30 pm #

      Hi Kurt, many thanks 🙂 If you can find the time, please rate it on WordPress, the more positive feedback it gets the better!

      The easiest way I can think of for that would be to import the groups and capabilities directly into their tables in the database. See Import CSV file directly into MySQL on how to do that. The tables you need to import the data into would be wp_groups_group and wp_groups_capability (assuming the default table prefix wp_ is used). On the group table the value for the name column must be provided, on the capability table it’s the capability.

  22. Nick July 9, 2013 at 5:47 pm #

    Kento,

    How do I restrict by URL? I have a forum (bbpress and buddypress)that is for paying monthly members only and I have just learned that every new topic, reply, post, etc is public until I check the box in the back end editor. The forums home page and menu is restricted, but if you have a link to a forum, topic or reply, it is not restricted by default.

    My Current Plugins setup:
    bbpress
    buddypress
    Woocommerce
    Groups
    Groups Woocommerce
    WooCommerce Subscriptions
    Groups 404 Redirect

    Thank you

    • kento July 10, 2013 at 8:16 pm #

      Hi Nick,

      An easy solution that I can think of is to modify your theme pages to check whether the current user should have access. Or you could probably build on Groups Forums Restricted – this plugin is intended to work together with Groups Forums, but I think you could use it as a starting point to protected your bbpress-based forums.

  23. mike July 2, 2013 at 10:33 pm #

    I want a plug in that will allow me to have different groups. South austin Memories wants to have page and a group for each graduating class of the high schools from South Austin. People will join their high school class. Want to make it easy for reunions. Might need to be multi site, I do have the empire builder plugin which makes a wordpress blob multi site. Would like your ideas.

    • kento July 3, 2013 at 12:55 pm #

      I can’t say if it will be a perfect fit for what you plan to do, but you can give it a try. You can establish a group for each class and let people join their corresponding group freely. See the Shortcodes section in the documentation for details on the [groups_join] and [groups_leave] short codes.

      If that seems appropriate, then the Groups Newsletters plugin could be used to communicate information about events and other relevant information to group/class members.

      Also Groups Forums could be used to provide discussion spaces for alumni.

  24. Cody June 24, 2013 at 8:26 pm #

    I contacted via email, but now following up. Our web developer posted above about an issue with our search results and the Groups plugin.

    http://www.itthinx.com/plugins/groups/#comment-7779

    Subsequent versions have not fixed the problem. Please contact me about this issue, since we would like to implement a fix as soon as possible. Thanks.

    • antonio June 25, 2013 at 6:44 am #

      Hi,
      this must be fixed, please give us the website link to take a look (and if is possible, an user with restrictions).
      cheers

  25. doug June 12, 2013 at 8:18 pm #

    How feasible would be adding a date tag to users?

    EX: [groups_member group="Registered" after_date="xx/xx/xx"]

    So only users who registered after that date can see the content.

    This would make selling digital magazine subscriptions way easier so people could become members, but wouldn’t have complete access.

    • antonio June 13, 2013 at 8:12 am #

      Hi,
      you can use Groups Subscriptions to sell digital access.
      cheers

      • doug June 13, 2013 at 2:08 pm #

        I am aware of that. But the Groups Sub plugin does not support date-based access, does it?

        • antonio June 14, 2013 at 9:37 am #

          Hi,
          no, there isn’t an attribute for this purpose.
          cheers

          • doug June 18, 2013 at 6:27 pm #

            Every digital magazine on the planet needs this functionality. It might be a great premium add-on to develop. I know I’d buy it!

            • antonio June 19, 2013 at 5:42 am #

              certainly looks interesting, thanks for the feedback

  26. Eric Bailee June 11, 2013 at 12:39 pm #

    Hi,

    I am eager to know if this plugin can do the following or if this and another plugin can achieve it?

    I want to have various groups, within each group are registered users. Each group contains and administrator/Author where they can view and edit all users in that specific group and for that group ONLY.

    When a user logs in, it only shows the user’s profile page, group name, post/attachments.

    Is this possible?

    • Eric Bailee June 13, 2013 at 1:03 pm #

      Hi,

      I noticed my question is still sitting in moderation, is it possible to achieve having this functionality where a group admin/author or contributor can have access to all users in that group and can see the list of users in that group.

      Other groups should not see other groups, but their own, something like:

      GROUP 1
      |
      ADMIN USER FOR GROUP 1, CAN ONLY SEE USERS IN GROUP 1
      |
      USER 1
      USER 2

      GROUP 2
      |
      ADMIN USER FOR GROUP 2, CAN ONLY SEE USERS IN GROUP 2
      |
      USER 3
      USER 4

      Thanks

    • kento June 14, 2013 at 8:52 pm #

      It can be done using Groups’ API, probably even just using the capabilities and assigning them in the right way to groups. I haven’t done it myself, but as all the capabilities that WordPress uses can be assigned to groups, it might just be a matter of investigating if the right capabilities are there and then assigning them to the group(s).

  27. Seb D. June 7, 2013 at 12:21 pm #

    Another two questions 🙂
    Is it possible to rename the Registered Group (Membre, in french) ?
    I can rename it in the database, but i would like to be sur no issues came with that.

    Remove the long list of capabilities in Groups > Capabilities does have an impact with the real wordpress capabilities ?

    Thanks !

    • kento June 11, 2013 at 1:01 pm #

      You shouldn’t rename it in the database, the Registered group is referenced internally by name and should not be removed or renamed.

      You can remove the capabilities but it will effectively remove a lot of the advantages the Groups offers.

  28. Seb D. June 7, 2013 at 10:38 am #

    Hi !

    One little ask.
    Is there a way, when creating/editing a page, to choose access by group, and not by capabilities ?

    Sébastien

    • antonio June 10, 2013 at 6:06 am #

      Hi,
      you can restrict some content with groups, but total access must be with capabilities.
      You could create one capability per group, and call it equal.
      cheers

  29. James June 5, 2013 at 10:47 pm #

    In other words, here is my code, which has worked and suddenly stopped working unexplainably:

    $user = get_current_user_id();
    if ( Groups_User_Group::read( $user, ‘1’ ) ) { echo “”; }
    elseif ( Groups_User_Group::read( $user, ‘2’ ) ) { echo “”; } else { echo “”; };

    Now no matter what, only the third case gets activated and it is always prompting three.css. why?

    • antonio June 6, 2013 at 2:14 pm #

      Hi,
      you can get user’s groups, for example:

      $user = new Groups_User( get_current_user_id() );
      $groups = $user->groups;
      foreach ($groups as $group) {
      echo $group->name . ",";
      }

      cheers

      • James June 6, 2013 at 4:42 pm #

        Thanks

        So this adds all the groups this user belongs to as an Array in $groups ?

        • antonio June 7, 2013 at 8:46 am #

          yes, in this case $groups is an array.
          cheers

          • James June 18, 2013 at 5:15 pm #

            Well I am using the following code, I am just trying to check if they belong to one particular group and execute code, but I don’t want to loop it because I only want it to run once:

            $user = get_current_user_id();
            if ( Groups_User_Group::read( $user, ’28’ ) ) { echo “”; }
            elseif ( Groups_User_Group::read( $user, ’29’ ) ) { echo “”; } else { echo “”; };

            The problem is that this code seems to work and suddenly stops working. and then suddenly works again.

            • antonio June 18, 2013 at 6:14 pm #

              Hi,
              please, take a look to this comment, maybe it can help you.
              cheers

          • James June 18, 2013 at 6:32 pm #

            It doesn’t let me reply to your last comment for some reason.

            In any case, i am not sure what that code in that comment does exactly and how to I apply it to my case. in what way does it differ from what I’ve done?

            Thanks

            • antonio June 19, 2013 at 6:09 am #

              Hi,
              I thought it best to use the group name, in case the id was wrong.
              But you can try:

              if ( class_exists('Groups_User_Group'))
              echo "OK";
              else
              echo "ERROR Groups is not loaded"

              to verify that your code is not launched before loading groups.
              cheers

  30. James June 5, 2013 at 10:42 pm #

    For the love of goodness. all I want to do is get the current logged in user’s group. either group name or group id i don’t care. and not in shortcode, in php.

    How do I do that?

  31. Lucas Stark June 5, 2013 at 10:24 am #

    WooCommerce Dynamic Pricing now supports the Groups plugin. You can control if an advanced rule applies to specific groups, or use the new Simple Group module for applying price adjustments to all members of a group.

  32. Francois Wessels May 31, 2013 at 10:31 am #

    Hi there,

    Can Groups allow only a specific user to edit a custom post type — for instance listings for property where I would like to enable the agent to edit his/her own listing but not other agents listings.

    Kind regards

    Francois Wessels

    • antonio June 3, 2013 at 11:12 am #

      Hi,
      you only need create a capability for every user, and assign this capability to the post.
      For example:
      create capability: “canUserA”
      Assign “canUserA” to user “A”
      In Groups->Options: select this capability to be offered to restrict access to posts.
      In “postA” assign Access Restriction “canUserA”
      cheers

  33. Eric May 23, 2013 at 1:55 am #

    Found myself needing to systematically create new capabilities, groups and relationships for a custom post type using the API. The API documentation was very helpful, but also thought some examples would be helpful for others that are looking to do some similar things. Here’s some code snippets that could come in handy. No guarantees that these are the most efficient calls to make, but they’re working for me.


    $capname = 'new_capability';
    $groupname = 'New Group';
    // Create a new capability labeled $capname. Give it the description of $groupname for easy reference.
    Groups_Capability::create( array( 'capability' => $capname, 'description' => $groupname ) );

    // Create a group with the name of $groupname.
    Groups_Group::create( array( 'name' => $groupname) );

    // Get the group object using $groupname (so you can get the group ID later)
    $group = Groups_Group::read_by_name( $groupname );

    // Get the capability object using $capname (so you can get capability ID later)
    $capability = Groups_Capability::read_by_capability( $capname );

    // Create a relationship between the $capname capability to the group $groupname using the objects you got earlier.
    Groups_Group_Capability::create( array( 'group_id' => $group->group_id, 'capability_id' => $capability->capability_id ) );

    // Get the group object called "Membership"
    $membergroup = Groups_Group::read_by_name( 'Membership' );

    $ispartmember = 1;
    // Do you also want to make this capability part of the "Membership" group?
    if( $ispartmember ) {
    // Tie the $capname capability created earlier to the 'Membership' group you just retrieved.
    Groups_Group_Capability::create( array( 'group_id' => $membergroup->group_id, 'capability_id' => $capability->capability_id ) );
    }

    // Grant access to this post ($post_id) to the $capname capability.
    update_post_meta( $post_id, "groups-groups_read_post", $capname, $capname );

    // Delte the $capname capability (using the object you got above)
    Groups_Capability::delete( $capability->capability_id );

    // Delete the $groupname group (using the object you got above)
    Groups_Group::delete( $group->group_id );

    // Relabel an existing capability to $newcapname
    $currentcapname = 'current_capability';
    $newcapname = 'renamed_capability';
    $capability = Groups_Capability::read_by_capability( $currentcapname );
    Groups_Capability::update( array( 'capability_id' => $capability->capability_id, 'capability' => $newcapname, 'description' => $capability->description ) );

    // You just changed the capability label. Now update this post so it still grants access to that capability.
    update_post_meta($post_id, 'groups-groups_read_post', $newcapname, $currentcapname);

    // Rename an existing group to $newgroupname and keep the existing Parent relationship
    $currentgroupname = 'current_group';
    $newgroupname = 'new_group';
    $group = Groups_Group::read_by_name( $currentgroupname );
    Groups_Group::update( array( 'group_id' => $group->group_id, 'name' => $newgroupname, 'parent_id' => $group->parent_id ) );

    • antonio May 23, 2013 at 8:41 am #

      Hi Erik,
      thanks, it would be helpful for others.
      cheers

  34. Richard May 20, 2013 at 10:42 am #

    Hi,
    Is there a way to display the different groups you have set up in the edit page/post page. So that I can restrict the page/post to a specific group rather than one with a capability? If I have several clients currently I would have to set up a group for each client, and a capability for that client. So that I can restrict a post/page to a specific client.

    thanks

    • antonio May 21, 2013 at 8:23 am #

      Hi,
      you can restrict content to different groups, but not access to page/post.
      You could create a public post/page, and restrict sections in content to different groups.
      cheers

      • Richard May 21, 2013 at 12:19 pm #

        Ah ok. I have created a capability for each client, and then in edit page/post I have the ability to restrict per group.

        Thanks

        • antonio May 21, 2013 at 1:48 pm #

          You can use [groups_member] and [groups_non_member] shortcodes for this purpose.
          cheers

          • Richard May 22, 2013 at 4:55 pm #

            Ok thanks.

  35. Tobias May 16, 2013 at 11:17 am #

    Hi, I would like to show a message using groups shortcodes to members who does not currently have a specific groups “group” membership.

    Ex. a [Not Group=X] message text [/Not Group] style shortcode.

    Is this possibly and if so, what is the proper syntax/usage?

    • antonio May 17, 2013 at 6:58 am #

      Hi,
      you can use [groups_non_member] shortcode. Check out Groups Documentation – Shortcodes .
      cheers

      • Tobias May 17, 2013 at 7:42 am #

        ok so the syntax would be [groups_non_member group="gold"]Members who isn’t a member of gold group will see this message? [/groups_non_member]

        Have I understood the syntax correctly?

        • antonio May 17, 2013 at 8:30 am #

          yes, correct.

  36. mitesh May 15, 2013 at 9:54 pm #

    Is there any way I can add a user to a group in php .i.e. wordpress backend ?

    And is there any way I can move a member from one group to another group, again in php manually ?

  37. Melissa May 14, 2013 at 10:24 pm #

    I have 2 groups: Supporter and Member. Supporter will see some page content, members will see the supporter content PLUS their own additional content. I setup the groups and capabilities as laid out in the FAQ “Advanced/Premium” question. I am able to get this to work correctly if setting Access Restrictions on a post itself, but not seeing how to do this with shortcodes. I currently have two shortcode blocks, one for group=”Member” and one group=”Supporter”. When I login as a member, in only see the member content, not the supporter content as well. Please advise!

    • antonio May 15, 2013 at 7:41 am #

      Hi,
      you can use group=”GroupA,GroupB”, in your case:

      [groups_member group="Member"]
      This content is only available for Members.
      [/groups_member]

      [groups_member group="Member,Supporter"]
      This content is available is you are a Member OR a Supporter.
      [/groups_member]

      cheers

      • Melissa May 22, 2013 at 4:15 pm #

        Thanks! Is there a way to rid of the white space that shows up on the page when these are in place.
        If I have the example above in place and a regular user sees the page (not able to see any of the supporter or member content), it shows two blank lines.

        • antonio May 23, 2013 at 8:13 am #

          Hi,
          newlines before, after and between shortcodes are showed.
          In this case, if you have:

          Text before.
          [groups_member group="Member"]
          This content is only available for Members.
          [/groups_member]
          Text after.

          Shows two blank lines.
          But if you use:

          Text before.[groups_member group="Member"]
          This content is only available for Members.
          [/groups_member]Text after.

          You have not blank lines.
          cheers

  38. Melissa May 14, 2013 at 5:48 pm #

    I installed the Groups plug-in, added 2 new groups, but I can’t see where to add my test user to a group! Please help!

    • kento May 14, 2013 at 9:04 pm #

      In the User section you should see the selection box on top. If not, there might be a conflict with another plugin. With 1.3.11 just released, you can also enable editing group memberships on a user’s profile under Groups > Options > User profile.

      • Melissa May 14, 2013 at 10:25 pm #

        Thanks, got that part figured out!

  39. Henk May 13, 2013 at 11:47 am #

    Hi,

    Is there a way to get posts to be configurable for different user groups? Say, free, standard and premium, and have only some posts visible for a specific group? I can only find “groups_read_post”, so not sure if there is another way?

    Thanks!

    • kento May 13, 2013 at 11:59 am #

      Hi Henk, there’s an example on the FAQ page. It’s very flexible: you can freely enable any number of existing or new capabilities to restrict access. Assign these capabilities to the groups that should be allowed to view the posts, this means that you can have groups that can access independent as well as related subsets of posts …

      • Henk May 13, 2013 at 12:03 pm #

        Wow. Sorry for the noob question. I don’t know why I didn’t think of checking for a FAQ. Must be a combination of lazyness and a brain fart.

        I’ll check it out, thanks!

        • kento May 13, 2013 at 12:08 pm #

          😀 no worries, actually there should be an examples section on this stuff here on the site in the documentation section.

  40. T.J. May 8, 2013 at 2:03 am #

    How can I restrict a whole page for only guests?

    • antonio May 8, 2013 at 6:36 am #

      Hi,
      you can use for example:
      [groups_non_member group="Registered"]bla bla bla [/groups_non_member]

      cheers

      • T.J. May 8, 2013 at 4:44 pm #

        Hi,

        That looks like that only restricts the content between the shortcodes. I need to restrict the whole page so it only shows in menu for guests…Thanks!

        • antonio May 10, 2013 at 6:57 am #

          Hi,
          if you want restrict menu item visibility, you need a plugin for this purpose, Menu Item Visibility Control seems to do that.
          cheers

  41. Mike Sosteric May 3, 2013 at 2:28 pm #

    this is a great plugin. however I need to be able to have some ability to manually add users to specific groups, independent of their having paid for a subscription. Free subscriptino basically. I need to be able to do this because I’m moving one site to another. I tried to do this in the WP users menu, but there doesn’t seem to be a way to modify that

    help

    • antonio May 3, 2013 at 2:35 pm #

      Hi Mike,
      you can do it, checking the desired users, and Add/Remove to group using the buttons just above the users table.
      cheers

  42. mohamed amine April 29, 2013 at 6:26 pm #

    thank you for your quick response

    I tried to do it but nothing happens in my page below the form.

    http://www.albarakagroup.ca/devis/

    • kento April 29, 2013 at 6:56 pm #

      What’s supposed to happen when you submit the form? If you just place the shortcode below the form and the user isn’t logged in, it won’t show anything because the users have to be registered before you can let them join a group.

  43. mohamed amine April 29, 2013 at 2:38 pm #

    hi,

    can i have a sgin up with this plugin for registration?

    there is a shortcode for that.

    thx

    • kento April 29, 2013 at 6:12 pm #

      Hi there,
      I think you’re looking for the groups_join shortcode documented in the Shortcodes section for the Groups plugin.
      Cheers!

  44. karen April 23, 2013 at 4:07 pm #

    I’m trying to use Groups plugin in conjunction with WooCommerce. I have talked to the commerce people and they do not think what I would like to do is possible, and told me to post in the groups forum.

    We are not using this as a traditional shopping cart.

    so for example:

    -You have a company.
    -In this company there are 3 departments.
    -Each department has a department manager.
    -In each department there are many users(customers?).
    -The users should be able to sign in and only see the products for their department, and order/pay for these items.
    -The department manager should be able to login, and see and approve any and all orders placed by his department, but NOT see any orders placed from another department.

    Right now I am having a problem trying to get the last point to work.
    I have already set up users, and roles, and have different products showing up for the different departments.
    HOWEVER when you login to the back end you see ALL the orders placed by every department. I would like the department manager to only see the orders placed by HIS department.
    Is this possible?

    • antonio April 23, 2013 at 5:27 pm #

      Hi karen,
      that is not possible, it would require a custom implementation using Groups API.
      cheers

      • karen April 23, 2013 at 5:50 pm #

        Okay thank you antonio, I will look into building something on my own that will work.

  45. Michael April 23, 2013 at 10:46 am #

    Groups plug-in 1.3.8. installed on a WP 3.5.1. installation.

    Groups gives me the option to display some columns in the Admin> Users > All Users screen. I can activate this option using the ‘Screen Options’ tab at the top of that page. However, when I look at that pull-down menu, I have the ‘Groups’ tick-box showing up twice. Even if I check both boxes I only get one bunch of group fields showing up on my All Users page. This doesn’t matter too much from an operational POV – but obviously something is not right and I’d like to fix it if possible. Any ideas welcome. TIA

    • antonio April 23, 2013 at 2:00 pm #

      Hi,
      I have tested this version, and only appears once.
      Maybe there is a conflict with other plugin that generates this error.
      You can test desabling other plugins and/or reinstalling groups.
      cheers

  46. Jan April 20, 2013 at 2:25 pm #

    Hi,

    I would like to buy the plugin for jigoshop.

    Before that I need to know, is there a shortcode for login information.

    When the user login, could I redirect him to a certain page, not the user dashboard in WordPress?

    Thank you for your help.

    Jan

    • antonio April 22, 2013 at 6:16 am #

      Hi,
      Groups doesn’t change the behavior of login redirection.
      For this, you need other plugin, you can see Useful Plugins
      cheers

      • Jan April 29, 2013 at 7:01 pm #

        Hey Antonio,

        I have installed the plugin Peter’s login redirect.

        However, I do not know how to set i up. Because I need the user of one group redirected to one page and the users of other group to different page.

        Do you have any guideline how to do it.

        • antonio April 30, 2013 at 3:40 pm #

          Hi,
          I think you don’t do it with Peter’s plugin.
          Maybe, you can redirect to a comun page, and in this page, show a link according to that group belong.
          Code for that page, for example:

          [groups_member group="A"] linkA [/groups_member]
          [groups_member group="B"] linkB [/groups_member]
          [groups_member group="C"] linkC [/groups_member]

          cheers

          • Jan May 3, 2013 at 8:37 am #

            I see. Then maybe I am missing how to use the groups plugin.

            SO the purpose is to show only some content. To people who are loged in and are members of a group.

            Maybe it would would be worthy to create a plugin that would redirect members of a group to a page which is dedicated only to them.

            The plugin would gain extreme power.

            Please, do not consider my comment as a critique.

            • antonio May 3, 2013 at 10:11 am #

              Hi,
              with groups you can show some content only to the people who are loged in and are members of a group.But you can redirect at login to different pages.

              Don’t worry, all feedback are wellcome, and that you propose is very interesting.

              cheers

  47. alex wolk April 19, 2013 at 8:08 pm #

    Is there a wordpress newsletter or email plugin that works with groups? I would love to be able to send simple newsletters/announcements to different groups through the backend. Do you have any recommendations or other solutions that might work? I would even be willing to pay for some development

    • kento April 24, 2013 at 10:02 am #

      Hi Alex,

      That’s something I’d be interested in, too, but I’m not aware of an existing integration with a newsletter plugin. I’ve considered creating a solution based on Groups myself, as several have already expressed interest in ‘something’ like that … it could be an integration with an existing newsletter system that works well, or something built from scratch. We can talk and see what might be interesting 🙂

  48. diego April 18, 2013 at 8:16 pm #

    I’m using you groups plugin in my blog since I need to have different groups of users. Each group of users should see only one category. Everything works wonderful. Every group has his own capacity, etc.

    The only problem I have is that in the wp categories widget, all the categories are shown to all users. IIRC, there is no way to fix this, even if I modify directly the categories widget?

    Thanks in advance!

    • antonio April 19, 2013 at 8:54 am #

      Hi,
      you must use Groups API for this purpose. cheers

  49. ekg April 17, 2013 at 2:13 pm #

    Bulk deleting of default capabilities would be SOOOOOO nice. I don’t want all of these unneeded capabilities cluttering up the screen, and now I have to manually delete every single one!!

    • antonio April 18, 2013 at 8:38 am #

      That’s right, we’ll look, thanks

  50. Kirk Wight April 16, 2013 at 4:20 pm #

    It appears search results are viewable regardless of permissions. Clicking on the post will return a 404, but post content is still entirely visible on the search results page.

    Is there a way to give search results the same behaviour (post not displayed if protected) as everywhere else?

    • antonio April 17, 2013 at 6:52 am #

      Hi,
      We are fixing this error, in the next version you’ll have available.
      cheers

      • Kirk Wight May 29, 2013 at 4:53 pm #

        Search results still seem to be visible regardless of permissions in 1.3.11. Any update on when this will be fixed?

        • antonio June 3, 2013 at 10:13 am #

          Hi,
          in version 1.3.11 this is fixed.
          Maybe your test user has capabilities to see all posts.
          cheers

    • kento June 26, 2013 at 9:19 am #

      There was never anything that needed to be ‘fixed’ in this respect (@antonio why do you think this has been fixed in 1.3.11? – I might be wrong but I can’t see where any of the changes that I made would have had any impact on that).

      If you get search results that include protected posts, then you have ‘something’ that includes those posts by itself. For example, a direct query to the database. Another reason could be a plugin that is interfering or a function in the theme.

      Things you can do (on a test site which should be a copy of your production site):
      – check how search results are obtained (check the actual algorithm)
      – disable all plugins except Groups and check the results, enable other plugins individually in addition and see if the results are different
      – use a default theme and see if that makes a difference

      I’d be interested to see what is causing this on your site, please let me know your findings.

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