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,691 responses to “Groups”

  1. Hey, is there any way I can restrict posts when running a “get_posts” function. I have assigned posts to a specific group but when I run get_posts from a custom wp_endpoint all posts of my post type are being returned. I can confirm the user is logged in prior to running the get_posts function.

    Thanks,

    1. Hi Ian,

      It will filter out the restricted posts when you use get_posts(), if this doesn’t happen on your setup, then the most likely cause is that you are calling get_posts() before Groups had a chance to impose the restrictions. I would make sure to act after the plugins_loaded action has fired.

      Cheers

      1. Hey Kento,

        Thanks for your quick reply, it’s much appreciated. I love your plugin groups`.

        Kind regards,
        Ian

      2. Hi Kento, A work colleague was having a similar issue as I was with the plugin (get_posts())) showing posts that were restricted. The issue was get_post() applies “supress_filters” which I assume stops the Groups plugin from running it’s restriction filters.

        1. Hi Ian,

          Hey thanks for mentioning that, you’re right! You would indeed need to make sure to pass that parameter set to false, so it would be on the lines of $posts = get_posts( array( 'suppress_filters' => false ) );

          Cheers

  2. Hello!

    Thank you so much for your Plugin – it helps a lot!
    However, I would have a question: Previously, on the WordPress Dashboard user page, in addition to the user roles, all created groups listed and available via link. It was also displayed how many users were in the appropriate group. Unfortunately, this great view is not there anymore. The groups can only be called up via a filter. For some a useful feature – but I long for the great overview over. Could I magic it again, maybe manually?
    I would be very happy about your answer and help!
    Thanks, Alice

    1. Hi Alice,

      Thanks for your kind comment on the plugin, I’m always very happy to hear that is useful!

      Regarding the group links, we chose to offer a dropdown where you can select one or more groups instead because it is more flexible. You still have the same functionality available as with the links from before, it’s just taking up much less space and allows to select multiple groups. I would recommend to have a look at the documentation page here http://docs.itthinx.com/document/groups/memberships/ where you will find it explained in more detail.

      Cheers

      1. Hi Kento,

        thank you for the fast feedback! The fact that this solution allows to select several groups and takes away less space is a great solution! How the whole works, of course, I have already found out (I’ve been working for years with your plugin – love)!
        However, I find nowhere the possibility of an overview of all groups and how many members I have in this group. This has the old view, however, can show.
        Would you have the opportunity to read me the old representation in code form? So that I could also show all groups in addition to the dropdown window?
        Thanks, Alice

        1. Hi Alice,

          Ah ok, thanks for explaining that, I previously missed the part about the number of users in the groups – now I understand what you are looking for 🙂

          You can actually see those with this new approach too. If you check on your Users section, you will see that there are actually two different dropdowns for groups. One allows to choose groups for an action and the other allows to filter by group(s) <- the one that is beside the "Filter" button, when you click it, it will also show how many members there are currently in each group. But one thing we could add is to show the member counts per group when you go to the Groups > Groups section, that would certainly be quite useful and you would have a central point to go to when you want to see how many members there are. Instead of having you add this yourself and having to hack the plugin, I’d rather take note to add this feature to Groups itself. I think it’s useful basic information which is easy to show there.

          Cheers

          1. HI KENTO,

            unfortunately I’m afraid that we talked past each other! I was already aware that I can see the number of participants in a group in the dropdown box.
            Nevertheless, I am looking for a listing of all groups (including display of the number of participants and the function to go to the group link and get displayed below all groups.) Just as the presentation was once.
            In my case, I have a lot of groups that I have to revise again and again. When I work with the group view of the user, a general overview of ALL groups is very useful and makes work easier!
            I’m sorry for that circumstances!!! Thanks so much!
            Alice

            1. Hi Alice,

              Thanks again for explaining, but isn’t this basically what we already have under Groups > Groups? What I mentioned was related to this section with the addition of member counts for each group.

              Cheers

              1. Hi Kento,

                Hi,

                sorry for my inaccurate explanation!
                So what I miss exactly is the representation of all groups at a glance. Groups gives an overview of all groups via the tree view, but that is not enough for me personally. I have created over 30 groups. If I want to rearrange my about 200 users, it is extremely helpful to have an overall overview of all groups and then select the users and add them to a group. It is also good to be able to see at a glance which groups have more and which rather fewer members, to be able to count briefly whether these numbers are correct and, if necessary, adjusted. I also work with the Groups newsletter plugin. Just looking to see if all the users in the one group will receive my future email (because you’re in the particular group) is easier with a close view. Sure, the new layout is great because you can select multiple groups using this feature – yet it is extremely tedious to open the dropdown box and scroll through all of its 30 groups, then select and drill through them one at a time. As it used to be, with all the groups enumerated and clickable via a link and selectable – was for me personally the easiest and most effective way to work.

                To get to the point: It would be great if you could say if it would be possible to enter a line of code in the plugin in a particular file so that I can see the previous view. I like to wear it every time I update again! It would save me a lot of work!

                Thanks a lot! Alice

                1. Hi Alice,

                  Ok thanks for your detailed reply! To get straight to the question, it’s not possible to get to the previous view with the links by doing a slight modification. I would also strongly advise against doing any modifications to the Groups core plugin as you would have to repeat that on every update. I understand that your personal preference tends towards having all groups shown with links, but we decided to go with the selection instead to avoid overcrowding the links on top and make it much more flexible. I think that we could be showing the number of users in each group under Groups > Groups though and we could even link those numbers to the Users screen with the group filter applied. That would certainly make sense to have and I’m taking note to look into it for the next update.

                  Cheers

    2. Hey after much investigation I seemed to have fixed the problem by using a WP query rather than get_posts. Might be worth noting if I haven’t actually done something stupid my side haha. Thanks for your plugin, very useful!

      1. That’s good to hear Ian, if it works fine with WP_Query then it should be ok. Thanks for using it!

  3. Amazing Plugin. Very useful for our magazine review blog. But I have a question about it. Our Team works with the WordPress Gutenberg Editor. Unfortunately, I’ve noticed that isn’t possible to switch between the two Group-Block-Types. (To make an “only visible for members” block into an “only visible for non-members” block)

    Is these feature planned? We have often to duplicate certain Blocks and for now, it’s really a painful job starting by scratch every time you want to change the block element.

    1. Hi Ivan,

      Great to hear you like it! I wasn’t aware of the fact that switching between blocks easily isn’t possible. Good point! I’m not sure if that’s something we would have to look into or if it’s a Gutenberg thing. If it’s something we can solve, we should certainly take it into account. I’ve taken note to look into it.

      Cheers

  4. Hi Kento and/or Groups folks.

    Thanks for the help for the earlier issue. I was able to successfully make new groups using the API!

    My next task is that I want to show a specific link to redirect to a certain page to depending on the group name of the user. All users get assigned a “Registered” group but depending on certain criteria they will also get assigned an additional group.

    Here is the code I want to use

    <a href="portal.com/[groups_user_groups group exclude_group='Registered' format='none']" rel="nofollow">[groups_user_groups group exclude_group="Registered" format="none"]</a>

    The group name gets passed correctly, but obviously the link will break because the divs will pass through. Is there a way I can pass JUST the group name with no formatting

    1. Hi Rick,

      That’s great! Good to hear you got that to work 🙂

      I suppose that for the link, you would want to direct it at a specific group – if yes, then the issue with the way you are using the shortcode is that the group attribute expects one or more group names or IDs, separated by comma to limit the groups displayed. You would have to indicate the corresponding group there. But there’s another issue which would be the formatting, with that shortcode producing HTML tags, you would end up with an odd URL so I’d rather use a derived version of the shortcode or use the function that creates its output directly and strip_tags() and trim() what it returns (I’m saying off the top of my head, but it should be easy).

      Cheers

  5. Hi all,
    Love the plugin its been very useful. I am trying to build a plugin that creates a new group programatically based on the API but im not getting it to work. I’ve tried to use this
    Groups_Group::create( compact( "creator_id", "datetime", "parent_id", "description", "name" ) ); but that is not working as nothing is added to the groups database. (I corresponded the proper form fields in the variables above)

    Do I need to use the whole groups_admin_groups_add_submit() function?

    Thanks

    1. Hi there!

      Thanks for using it, I’m always happy to see people build upon it!

      The way you are using it looks correct. I would check the return value (which should be the new group’s ID) and also make sure that the variables are properly initialized. By the way, the only one that is required is the name parameter and a group with that name must not already exist.

      Cheers

  6. Can you control the number of daily visits per group, the number of times will be no longer accessible, and the next day will resume access.

    I want to build a member download site through woocommerce and limit the number of downloads per day through different groups.

    1. Hi Augus,

      At the moment, the Groups File Access extension for Groups provides the option to set an access limit per file but not per user and day. If you would like to have a look, the documentation provides details on its features.

      Cheers

  7. Shaun Ferry Avatar
    Shaun Ferry

    I’m using GROUPS for a school with 50 teachers.
    When one of the teachers logs in, they enter NEW events and then have to categorize the event my Selecting the ‘TEACHER’ Group to make sure NO pupils or public can see the ‘Teacher categorized events’.

    The school is nervous that giving the 50 teachers access to this feature gives a WIDE OPEN DOOR for them to enter a NEW EVENT but FORGET to categorize it as a TEACHERS event and thus hide it from the public/pupil eye. Do you know of any way to perhaps AUTO-Catagorize the TEACHERS catagory for any Teacher whose logged in and entering a NEW Event??

    Best regards

    Shaun Ferry

    1. Hi Shaun,

      A simple solution could be to use the Contributor role for those accounts so that they can submit a post for review without the ability to publish it unless they have been approved. Depending on what you use to control the events, you could also envision this by creating a group that holds enough capabilities to edit and submit those events for review. I would recommend to have a look at https://wordpress.org/support/article/roles-and-capabilities/ and on this documentation page http://docs.itthinx.com/document/groups/setup/capabilities/ you will find details on how to use these with Groups.

      Cheers

  8. We are thinking of using the Tiered Pricing for WooCommerce, but it’s based on roles, is there a way of getting it to work with Groups and vice versa?
    https://ignitewoo.com/woocommerce-extensions-plugins-themes/woocommerce-tiered-pricing/

    1. Hi Rick,

      It doesn’t seem to but I can recommend eggemplo’s WooCommerce Group Pricing instead: https://codecanyon.net/item/woocommerce-group-pricing/6806416

      Cheers

      1. Thank you Kento! That’s perfect!

  9. On our woocommerce shop, we restrict categories to specific user groups but in the same time, we want to keep open to public all the contents of the categories (since pricing will be hidden to public). Do you have a resolution for this?

    1. Hi Rachel,

      If you only want to hide the pricing info, you could filter the price displayed and base it on the group membership – these resources have info on both topics:

      https://www.skyverge.com/blog/change-woocommerce-price-display/
      https://www.itthinx.com/2013/02/12/how-to-hide-the-woocommerce-shop-page/

      Cheers

  10. Hi,

    On my event pages (using The Events Calendar by Tribe), I have two kinds of tickets (using Event Tickets Plus and WooCommerce), one with a member price, the other with a guest price.

    Using the plugin Groups by ithinx, I edit the ticket on its product page to restrict the visibility of that product to the group “Members”, so that on the event page, if someone is not a member of the group “Members”, they cannot see that ticket. This works quite well, except…

    Whenever I edit an event that is visible to everyone which has both member and non-member tickets, as soon as I save any revisions to the event, the group restriction of the visibility of the member ticket gets removed so that it is also visible to everyone. (It seems to me that whatever restrictions the event has get transferred to the tickets.) I then have to edit the ticket again on its product page to restrict the visibility. Sometimes I forget to do this, and it costs me money.

    This happens the other way around as well: if an event is visible to Members only, the tickets also have their readability restricted to members (which is not a problem, but the other way around is).

    Have tested and confirmed this happens on a WordPress site with Twenty Seventeen theme, and just 6 plugins (Event Tickets, Event Tickets Plus, Groups, The Events Calendar, WooCommerce, and “Classic Editor” (disables Gutenberg editing). WordPress and all plugins are up to their most recent versions.

    The website given in the form is my test website.

    P.S. I have tried assigning the product to a category that is restricted to Members only, and then non-Members cannot see product pages of tickets in that category, but on the event page, non-Members can still see the ticket.

    1. Hi John,

      I’m not sure why this happens to be honest, but if you have a protected product and it gets ‘unprotected’, this looks like the restriction gets lost somehow. Given that you are trying this with what seems to me a minimal configuration but still get the issue, it’s probably an incompatibility or an error of some sort that interferes. Have you checked if you get any console errors in the browser by any chance? I’m just wondering if it’s related to a simple thing …

      Cheers

      1. Hi Kento,

        Given that it happens with minimal plugins, and it also happens the other way around (if an event is visible to Members only, tickets with no restrictions also have their readability restricted to Members), it seems to me not to be an incompatibility, but a process design flaw. That is, when the event page is saved, the group restriction properties of the event are applied to all the elements of the event by the plugin. By design. But… is it The Event Calendar plugin or the itthinx plugin that is doing the saving and applying? If it’s yours, then it seems to be an easy (although maybe not high-priority) fix. If it’s the Event Calendar that’s doing that… well, then I’m guessing I’ll get the standard answer from both of you (“we don’t guarantee compatibility”).

        While I am a great troubleshooter and pretty good at identifying conflicts and potential causes of problems, that pretty much applies at “high levels” (as opposed to “low levels”) of the tech. So when you ask if I get any console errors in the browser… I’m not a programmer, I wouldn’t know what errors to look for, and I’m not even sure how to go about looking for console errors.

        1. Hi John,

          Thanks for your detailed comment on this. We usually try to solve incompatibilities or issues where reasonable and doable, I wouldn’t rule out any further looking into it 🙂

          What I was referring to is the browser console. When you use e.g. Firefox and open the developer tools, you get a tab labeled “Console” and you can see any messages produced while the page loads (make sure to reload the page bypassing the cache: Hold down the Shift key and left-click the Reload button). The reason why I am asking is to see if there are any Javascript errors involved – these would show up in the console part …

          Cheers

  11. Is there a way i can exclude some groups e.g. Default group i.e “Registered” from groups array?

    Groups_Group::get_group_ids() and Groups_Group::get_groups()

    1. Yes, if you look at the code documentation https://github.com/itthinx/groups/blob/master/lib/core/class-groups-group.php#L531 you will see they provide the option to supply an exclude parameter.

  12. I would like to create an action that removes a user from a group if/when they click a button. Is there a way to do this? (I’m not a great coder, so I’d appreciate as much detail as you can provide). Thank you!

    1. Hi Alex,

      There is a shortcode that implements such a button. See http://docs.itthinx.com/document/groups/shortcodes/groups_leave/ – if you’re interested in the code, you can find it here https://github.com/itthinx/groups

      Cheers

  13. Is there a way i can get all groups array.

    1. Yes, Groups_Group::get_group_ids() and Groups_Group::get_groups() – these are well-documented in the code, although we should add some examples http://docs.itthinx.com/document/groups/api/examples/

      1. Yes, it worked. Thankyou.

  14. Anthony Randall Avatar
    Anthony Randall

    Hi Support

    Is there a way to notify a user with a welcome email when they first join a specific group.

    I’ve downloaded the notifications add-on, but that sends a notification to users who join
    ANY group. I just want users who join one specific group to receive a custom welcome email.

    Thanks

    1. Hi Anthony,

      As it doesn’t currently provide an option to do this on a per-group basis and also doesn’t have a filter implemented that could be used, you would need to create an action hooked on groups_created_user_group that removes the Groups Notifications action on the same hook, unless you want the notification to get through.

      Cheers

  15. Hi,
    We need a means to populate our groups to our products. We have around 2000 products involved.
    How can we best group mark our products?
    Thank you!

    1. Hi Lynn,

      I assume that refer to restricting access to sets of products based on groups – you can use the bulk actions available on top of the product list where you will find the access restriction option similar to when you edit a product individually. The Access Control has more information on restricting access if you want to have a look.

      Cheers

  16. Hi there — I just got this plugin today and have to say, it’s very easy to use and the functionality is great! I do have an issue — my [groups_non_member] shortcode isn’t working. Instead, a user not in the group gets an Error 404 message, even though the page uses the shortcode and has a message to display. Any guidance to make the non-member shortcode work? Thanks!

    1. Hi MM,

      Great to hear that you find it useful! Many thanks for you kind comment 🙂

      Regarding the shortcode, it won’t produce a 404 for a page, you probably also have an access restriction set directly on the page – please have a look here http://docs.itthinx.com/document/groups/access-control/ for details on how these work.

      I would assume that you’ve protected the page with a group and placed the shortcode on the same page, in that case, any unauthorized user would not even get to see the content protected by the shortcode because access to the protected page itself isn’t granted.

      Cheers

      1. Ack — you’re 100% right. Got it fixed — thank you VERY much!

        1. Great! 🙂

  17. Michael Broughton Avatar
    Michael Broughton

    Hi,
    I am using WP All Export jobs triggered by CRON for scheduled data exports from my WooCommerce websites.

    When the export jobs are triggered manually, everything works as expected and there are no issues. However, when the job is triggered by CRON only variable products are exported and simple products are not picked up by the job.

    After much testing I have identified that this issue appears when the Groups plugin is active on the site. Subsequently, there is something in the plugin that is preventing CRON jobs from accessing all the product types.

    Any idea what this issue could be?

    Thanks!

    1. Hi Michael,

      I just saw you posted your question here, too – in case you haven’t read my reply over on your post, this is what I recommended:

      I don’t see any relation to Groups itself – but the first thing that I would recommend to check is that PHP memory limits are not exceeded. It’s often the case that you get the symptoms you describe when that happens, disabling a plugin reduces the overall memory footprint and then it appears that the plugin was the culprit.

      It this is still an issue, try raising the memory limit and check it please. I’ll mark this as resolved but feel free to follow up if you still have issues after trying the suggestion.

      Cheers

      1. michaelbroughton Avatar
        michaelbroughton

        Hi Kento,
        Thanks for the feedback on this.

        Taking your advice I have been in contact with my hosting provider to double the PHP memory allocation and check the PHP error log but we can not find any issue with the PHP memory allocation. Additionally, I am doing my testing with just the minimum number of plugins activated and the root cause remains activation of the Groups plugin.

        Could I ask you to take another look into this?

        Just to make clear that I have the plugin network activated on a multi-site network, so please take that into consideration during your testing.

        Many thanks,

        Michael

        1. Hi Michael,

          I just wanted to follow up with you as George is still investigating this and will reply to you on the topic.

          Cheers

          1. Michael Broughton Avatar
            Michael Broughton

            Great, thanks for the follow-up Kento. Waiting on George then!

            Michael

          2. Michael Broughton Avatar
            Michael Broughton

            Hi Kento,
            Just a quick update to let you know that I have not heard back from George for a couple of weeks, so I am still waiting for your feedback on what the issue is.

            Also, just to let you know that I updated to the Groups 2.7.0 version you released this week, but unfortunately the issue persists so no goog news there.

            Many thanks

            1. Hi Michael,

              I’ve just checked and he has followed up today on the topic. Seems like we couldn’t replicate the issue you get so I would assume it’s an issue with your site’s particular setup. I would recommend to have a look at the installation he mentions and contrast it with your’s. Please follow up with him on the topic in any case.

              Cheers

  18. Hello,

    I want to know if it’s possible to subscribe front-end to a group?
    This is for an educational purpose!

    thanks

    1. Hi,

      Thanks for asking! Yes it’s possible, a simple way to let users join a group is by using the [groups_join] shortcode. Let’s assume that you have a group called Yoga and you want to let people join that group, you would simply put [groups_join group="Yoga"] on a page.

      Cheers

  19. pavel_lishin Avatar
    pavel_lishin

    Howdy,

    I’m seeing something unexpected.

    I create two capabilities (“blue” and “orange”) and two corresponding groups (“Blue” and “Orange”), and two corresponding users (“Mr. Blue” and “Ms. Orange”).

    I then create two new corresponding categories (“blue” and “orange”) using the Restrict Categories plugin (https://www.itthinx.com/shop/groups-restrict-categories/), and restrict them to the respective groups.

    I then create a new post (“Hello World”) and add it to the Blue category. Logging in as Mr. Blue, I can see this post; logging in as Ms. Orange, I can’t. This is expected.

    But if I then add this post to both the Blue and Orange category, I cannot see the post as either Mr. Blue or Ms. Orange.

    I would expect the restriction to work on an “or” basis – since Mr. Blue is in the Blue group and has the blue capability, I expect to see the post, despite it also belonging to the orange category.

    Am I doing something wrong? Or is this how we expect this to work? And if so, how *do* I grant a given post to multiple groups at once without hierarchies? (Blue and Orange groups don’t have a hierarchical relationship.)

    1. pavel_lishin Avatar
      pavel_lishin

      Oh, and with further experimentation, it appears that this is *not* the case if I modify group membership for the post itself – assigning the post to both groups lets a member of either one view it.

      1. Hi Pavel,

        Yes that seems correct. When you have distinct categories related that require distinct groups to grant access and the user does not satisfy both, it will correctly deny access. If you were to assign both groups to the same category, then the choice would be any of the groups.

        Cheers

        1. I’m still kind of confused; why does it work one way for categories, but a different way for posts?

          1. On a post, when you restrict by a couple of groups, being a member of one of them is sufficient to view it. The same thing applies to categories, when you restrict a category with two groups, it’s ok to belong to one of those groups to see the related posts.

            When you use two different categories that use different groups, then the system will consequently require you to be a member of both.

  20. Hello developer i installed affiliates free..It created for me the affiiiate link:Your affiliate URL:
    https://www.lingerie-hub.com/?affiliates=2

    Use this code to embed your affiliate link:
    <a href=”https://www.lingerie-hub.com/?affiliates=2″ rel=”nofollow”>Affiliate link</a>

    1.Please may i know what link my affiliates will use when they sign up between these two links?

    2.Please is it also possible to know whose affiliates’ referral buys on my store….

    (I am working with the free plugin ,right now!)

    1. Hi,

      Please update your installed version to the latest release and use the new affiliates dashboard instead. Edit the affiliate area and leave only this shortcode on it:

      [affiliates_dashboard]

      You can see details on it on this documentation page.

      Cheers

  21. Is there a way to bulk edit products, or do groups have to be added one by one? Thanks!

    1. Hi Joy,

      Yes you can assign groups to several products in bulk, simply use the usual Bulk Actions on top of the table. Optionally, you can use Groups Restrict Categories to handle access restrictions based on categories and other taxonomies.

      Cheers

  22. Greetings,
    I am need to simply display the user’s current group they belong to on the page. Is there a shortcode I can use to display this? For example, something like,

    “Member’s Current Group = [group_name]” (Where the group name pulls from the database and displays what group the user currently belongs to).

    Any simple way to achieve this with a current/existing shortcode strategy or would it have to be custom coded?

    Thanks!

    1. Hi Joe,

      Among the plugin’s shortcodes you have [groups_user_groups] which you can use to show the user’s groups.

      Cheers!

  23. Hi Kento,

    Love the plugin. Just having an issue with making it work with Ajax Search Pro – one of you guys put some code up to make it work by editing the functions.php file, but I’m STILL seeing group search results in my drop down. The products are blocked, but I can still see them…

    Any views?

    Cheers

    stu

    1. Hi,

      Great to hear that you love it! I can highly recommend to use the WooCommerce Product Search search engine, not only does it provide a fully working live search that works beautifully with Groups, it has many other features that you will love. As its lead developer, I can only recommend it!

      Cheers

  24. Converting an existing school WIX web site to a WordPress site. There are a handful of pages that we need to restrict to approved people only (those registered at the school). I would like to initially upload or enter the email addresses for authorized people. But I could live with them registering (which would not get them access to anything more than public) and I would assign them to an “Approved” group which would then grant them access to those restricted pages. My simple question is, would we get an email letting us know that someone registered so that we could review their request and add them to the “Approved” group or let them know their request was denied?

    I’d really love to be able to query the MySQL database to see if their email address exists on a registered students record. But can live without that for now. Maybe a future project…

    1. Hi Dennis,

      That sounds great, thanks for considering Groups for your project.

      Regarding the registration emails, that’s something WordPress would do automatically, it doesn’t depend on Groups. So when you have a new user register, you would get a notification to the site administrator’s email.

      As an efficient solution to import a large amount of users and have them assigned to group(s) automatically upon import, we offer Groups Import Export. This would spare you and them from having to register individually, and as it would be based on your existing list of users, you wouldn’t have to map them manually to the appropriate groups. You would also be able to import different sets and assign them to different groups as needed.

      Regarding queries to the database for existing users/emails, you could also use the search function in the Users section of the WordPress dashboard.

      I hope that all of this helps you further.

      Cheers

  25. Hi! Is there any create a new group shortcode for frontend loggedin user such as editor or contributor?

    1. Hi Ricky,

      Thanks for asking but currently the shortcodes included don’t offer such an option. It’s something we’re working on among other things though, but I can’t really promise on an exact ETA for this type of feature yet.

      Cheers

  26. When you have a user that is not linked to any groups and you visit the “All Users” page to get a list of users you will get a small PHP warning at the top of the page and also in the error log:

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in wp-content\plugins\groups\lib\admin\class-groups-admin-users.php on line 358

    It seems that the $groups variable is null for that specific case and calling count() on that triggers the error. Changing the line to this seems to solve it:

    if ( $groups && count( $groups ) > 0 ) {

    Perhaps this, or a better fix can be included? I know it is only a minor warning everything works just fine, but would be nice if it could be fixed.

    Thanks

    1. Hi Robbie,

      Many thanks for pointing that one out! I assume that you have WP_DEBUG_DISPLAY defined as true so this is displayed, if you set that to false the notice won’t be displayed. But we should of course take care of it so it isn’t produced at all.

      Cheers

  27. Is there a REST API that I can use for assigning a user to a WooCommerce Group?

    I’m using the Groups Plugin and the only documentation I see is:
    http://api.itthinx.com/groups/
    http://docs.itthinx.com/document/groups/api/examples/

    However, I don’t understand how I can use this within a script like Python (or CURL)

    I’m using Python w/ the WooCommerce API to update orders and I would like to use a Group API to assign (or remove) a user from a group. Everything I see is listing PHP code.

    Any help would be greatly appreciated! Thanks!

    1. Hi Michel,

      Good question, we’re currently working on the REST API for Groups among other things. Currently it’s not possible to achieve this other than via Groups’ PHP API, so if you’d like to modify things via Python and REST, you’d have to write up your own handler if you need a solution right now.

      Cheers

      1. Hi Kento,

        Is there any update on this functionality?

        Kind regards,

        1. Hi Ian, this is still a work in progress …

  28. Hello Kento,

    Is there a way to prevent users who create an account from being automatically assigned to the Registered Group or assigned to a different group upon creating an account? For example, customers who create an account to access the site to purchase via WooCommerce.

    Please let me know if you need more details.

    Thank you.

    1. Hi Jonathan,

      The Registered group is always assigned to new users so one can easily address those as a group. This is not something that you would want to remove by design as it serves a very useful purpose. If you need to distinguish registered users by group in combination with purchases via WooCommerce, then you can use Groups WooCommerce which allows you to assign users to groups based on the product purchased.

      Cheers

  29. jordi sanchez Avatar
    jordi sanchez

    Hi,

    I have installed your amazing plugin. I would like that when I save my custom post type, depending on the group the publisher belongs to, save the group on custom post type added. Maybe is a problem of my wordpress? I use it with custom post types UI and Advanced Custom Fields plugins.

    Many thanks,

    1. Hi Jordi,

      Thanks for your kind comment on Groups!

      You can achieve this by creating a little plugin that acts when a post is saved. You would need to create a hook on the save_post action. You can obtain the groups that the author can use to restrict access using Groups_Post_Access_Meta_Boxes::get_user_can_restrict_group_ids() and for each of the groups obtained, assign them to the post using Groups_Post_Access::create( array( 'post_id' => $post_id, 'group_id' => $group_id ) ).

      I hope that helps!

      Cheers

  30. Is it possible to add users to a group based on their user role when they register?

    1. Hi Brian,

      Yes, there is a small plugin that does this https://github.com/itthinx/groups-role-registration

      Cheers

  31. Hi Kento,

    Thank you for this amazing plugin! I have an online program that allows users 45 days to access the content but the access doesn’t start from the date of purchase but rather from a certain day in the future (so adding a certain number of days access in the Groups WooCommerce plugin won’t work). Is there a way to set the expiration date of a group universally?

    So an example: On February 15, I would like the group “Online Program” to be removed from all Users who have this group in their Groups field, just as if I had come by and deleted it manually.

    Is this possible? Thank you in advance!

    1. Hi Alex,

      Thank you very much for your kind comment!

      To have all users removed from a particular group at a specific date, you currently have two options:

      1) Do it manually – filter the users by group, select all and remove them from the group. See the bulk actions described in the Memberships section of the documentation.
      2) Run a scheduled event which executes a function that does Groups_User_Group::delete( $user_id, $group_id ); for each user in the group.

      The first one is easy to do if you simply want them removed and set yourself a reminder for that date. The second is doing the same but of course you need to code it or have someone code it for you. I hope that this helps a bit!

      Cheers

  32. Thanks, Kento for taking the time to reply. Much appreciated. I read your suggested WordPress password page and it will work through more clumsy than the (expiring) plugin we are using now. This will get us across the forced changeover to php7.2. Best wishes for the new year. Rick

    1. Hi Rick,

      I’m happy to hear that this is a solution for you, wishing you a great start into the new year! 🙂

  33. Can Groups Plugin do this: I manage an organization’s website most of which is open to the public. There is one area that needs to be accessible to members only, ie members/xxx/xxx. I need this whole area to have one sign-in password when someone clicks on “members” on the main menu, however, those who sign in are NOT REGISTERED WITH THE SITE. Instead, they get their password via bulk email to the membership and just enter that when accessing the area. The reason for this is there are over 100,000 members and I couldn’t possibly keep registrations up to date, especially because I would not know who has ceased membership. I sincerely hope there is a way to accomplish this with Groups plugin. Thanks.

    1. Hi Rick,

      I appreciate your consideration of Groups to approach this but based on what you describe, it wouldn’t be a good match. In fact, WordPress already provides a very simple password protection for pages which seems to be more in line with what you describe.

      With Groups you must have a user account on the site and the user must belong to the related group to get access to a protected page. You can see more details on it here http://docs.itthinx.com/document/groups/access-control/

      WordPress’ password protection is described here https://codex.wordpress.org/Using_Password_Protection

      Cheers

  34. Hello,

    I just created a new capacity but I do not see how it has been granted rights, for example the permission to put a category. Can you help me ?

    thank you

    1. Hi Vincent,

      I think what comes closest to what you are looking for is the existing capability manage_categories. If you add this capability to a group, the group members will have it.

      Cheers

  35. Hello guys, I’m having a little problem with the groups plugin and I hope you can help.

    I have a subscription service where Macro Watch Subscribers can access this (Macro Watch) video class and it works just as expected… but when I made a list by taxonomy or term to display all videos by quarter (first quarter 2018) it display the titles of every video only if you’re a Macro Watch subscriber but even with the an statement to filter the way users access this list I can’t find a way to display the list to non registered users.

    Is there a way to do this?

    I’m attaching a Gist link to the code I’m using: https://gist.github.com/humbertopr/754e39c51752c78aeb0354f349da3102

    1. Hi Humberto,

      You would want to disable the posts_where filter of the Groups_Post_Access class while you attend to this request. Remember to reinstate them once you’re done. Alternatively you could pull the info from the database directly.

      remove_filter( 'posts_where', array( 'Groups_Post_Access', 'posts_where' ) );
      // get the posts and render the titles ...
      add_filter( 'posts_where', array( 'Groups_Post_Access', 'posts_where' ), 10, 2 );

      Cheers

      1. I think that did it!…

        Thanks for the fast response 🙂

        1. Great to hear that! 🙂

          1. Hey Kento, sorry to bother you again but after updating Woo and the plugins the stopped working on the website and I’m not sure why.

            Did something change? can you take a look at the code end let me know what I need to change?
            The filter is removed on line 28 and activated again on line 95

            CODE: https://github.com/MrHOG/Demos/blob/master/page-videos.php

            Thanks for the response in advanced.

            1. Hi Humberto, this looks ok to me 🙂

          2. Forgot to include the link where the list items are not showing anymore:
            https://richardduncaneconomics.com/videos/

            1. Thanks, this also seems to be working fine. You have the links to the protected posts while the posts themselves are protected.

  36. Hi, I was wondering, is there a way to make the posts that don’t have a group selected to be hidden from everyone (except users with administrator capabilities and such) until a Group is selected?

    The plugin is awesome, been using it for a while!

    1. Many thanks Nicolás, great to hear that!

      With Groups you would have to assign a group to the posts, otherwise it couldn’t be restricted. You could use a dedicated group for this purpose. As an example, when I am working on a documentation page that I don’t want to be visible yet until it’s finished, I assign it to a group named WIP so our team knows it’s work in progress. When the page is finished I remove the assigned group – that way you can publish the page without the public being able to see it. In your case, you would remove the special group and assign the group you want to be able to see it.

      Cheers

      1. Excellent I’ll do that !

        Thanks a lot for the quick reply

        =D

  37. Chris Norris Avatar
    Chris Norris

    I am wondering if its possible to add fields to the admin / group edit screen? If so, how can this be done, in a way that wont get overriden with an update.

    1. Hi Chris,

      That’s an interesting question. Groups itself does not provide customizable fields currently, but this is certainly open for suggestions. I suppose you want to attach customized information by group, is that correct? If yes, it could be good to add metadata to groups which people could use easily (similar to postmeta).

      Cheers

      1. I’m looking for this feature! It would be great to be able to add custom fields and store some more information related to each group.

        1. Hi Mary-Ann,

          Many thanks! Good to see that there is more interest in this. Would you be more interested in having this as a simple option on the admin side, or would you also find it useful to have a full integration of the additional data for use/submission on the front end? It would be interesting to know and consider these points for a possible development path … for example, shall we enhance our data model and integrate with popular forms plugins?

          Cheers

          1. Thanks for the response Kento!

            I think the latter would be a more complete, cohesive solution.

            I think it could start out simple, maybe only allowing for single line text, radio, checkbox, and dropdown fields. The fields could be set in the admin settings page, so when a user creates a new Group, the custom fields would appear.

            In my use case, I would go to the Groups admin settings page and create custom fields for Location (single line text), Start Date (single line text, or jquery datepicker if you want to get fancy 😉 ), and End Date (single line text). So when I go to create a new group, I’ll add the title, description, location, etc.

            Then being able to then display that data on the front end to users would be great. We’d display a list of groups that the user belongs to, along with the group location, start date, end date, and any other custom fields that we add.

            Regarding integrating with forms plugins, that’d be awesome! I use Formidable Pro pretty extensively, and one of the integrations that has been on my wishlist for a few years is a Groups + Formidable integration. Specifically the Registration add-on. It’d be wonderful to have a user fill out a registration form, and then have a Groups form action that adds them to a group based on some conditional logic.

            Cheers,
            Mary-ann

            1. Thank you very much for your detailed reply!

              I really agree with you on the form plugin integrations. Our integration with Gravity Forms has been around for a while, it is very useful for those cases where you need to assign users based on form submissions and registrations. But among the other form plugins for which I would also like to see an integration with Groups, too, Formidable and Ninja Forms are probably highest on my personal preference.

              There is an interesting solution for custom fields related to posts from Toolset, it is documented here. Based on what you have described, a similar thing for Groups would be a mature solution. If we were to approach something like that and start off with a more simpler subset that includes the field types you have outlined, it could make sense. Probably the hardest part of it is the funding as I wouldn’t really know how we could justify the effort related to developing it without some sort of budget. Maybe it’s time to look into crowd-funding parts that are really important for those who are using Groups, or maybe someone with an appropriately sized project would be willing to participate in covering the costs. Another form of contributing towards making that happen is obviously to contribute to its development directly with code, writing use cases and documentation. So for anyone who might fall into any of these categories, has a similar interest and is reading this, I’m looking forward to hear anyone’s thoughts.

              I’ve seen so many awesome ideas and suggestions for Groups, I’d love to be able to make most of it happen at some point.

              @Mary-Ann if you see any chance of contributing to these efforts in any way and which would also help you in your project, please let me know your ideas.

              Cheers!

  38. Thank you for the quick reply! I’ll look into those add-ons.

    Looking forward to the future updates!

  39. I love your detailed group features but I’m a bit disappointed that we have to use WP default user profile page for subscribers. Do you have any add-ons or features to create custom profile page?

    1. Many thanks for your feedback and the excellent question! We don’t have profile-specific extension (yet?) but maybe the WooCommerce integration or Gravity Forms integration can help you?

  40. Hi I need advice. I am looking to create a site that is a magazine/ blog that showcases different artists work. I want the reader to be able to buy the product from the artist/ designer directly. By clicking on a link or image or so on. I would like this to take them to a place of sale. This means I want the artist( seller) to be able to create their own page or ‘section’ of the site. They need to be able to manage the inventory and send the goods and so on. I just want a percent for facilitating the sale. I thought to create a multisite network and get artists to create their own ‘shop’ within the net work. However I am wondering if there is a simpler way? It’s also possible that the seller(artist) will already have a website and won’t want to have to manage two. So perhaps Affilate links will be what I need. Any advice or direction as to how to go about even one of these concepts would be appreciated.

    Thank you

    1. Hi Sally,

      Besides what I replied to you earlier in response to your email, as I just get to read your comment here I wanted to point you to some additional resources. I’m not sure what connection to Groups we can draw to this but I would recommend to also have a look at the Product Vendors extension for WooCommerce, alternatively Affiliates Products and certainly at WooCommerce Product Search which will be useful to find products in any case.

      Cheers

  41. I am trying to find a way to “modify” the groups_member shortcode but i cannot seem to get it to work.

    What i want is to be able to add some extra content to the shortcode so that when its being used its not just cutting off the content but rather cutting it off and adding an “unlock” icon and some text.

    we implemented the plugin on an onine digital subscription site, so we have a teaser of content and then the groups plugin locks down the rest of it. We currently have edited the plugin directly to add an else{ do some stuff like add an icon and link and some text} to the end of the shortcode function, but I really would like to add this code to the child theme in order to save the hassle of editing the plugin directly every time.

    remove_shortcode and add_shortcode don’t seem to work in this instance either… any help is much appreciated.

    1. Hi Jason,

      I can recommend to have a look at this implementation of a version of the shortcode https://github.com/itthinx/groups-cmember – it’s a plugin off which you can easily derive your version without the need to hack Groups itself. Just make sure to give the shortcode a unique variation name so it doesn’t conflict with the original one.

      Cheers

      1. The issue is that we have 1000’s of posts using the standard shortcode… so i would have to go back and change all of them instead of just requesting that the wordpress developer use filters in their plugins…

        1. A filter could be a good idea but it’s very easy to change the shortcode used for you with a simple SQL query replacing matches of “[groups_member” with “[your_shortcode”. Even if we were going to add a filter, if you are using a version that is specific to your site, a custom shortcode might be simpler to handle and would be more intuitive. As you initially mentioned that you are trying to modify the shortcode which I can’t recommend, using the replacement and a custom version is a more straight-forward and quicker option.

          1. I am not trying to “modify” a shortcode. I am trying to “extend” its functionality.

            Something that is pretty much standard practice for plugin creation in wordpress, is the creation of extensible plugins (or at least its highly recommended and rarely done ).

            I can very easily create my own shortcode to perform what i need done(i have) and then search and replace my database to use that shortcode instead of the one in your plugin(debating if its worth it), but at that point i can also just create the lock feature in that shortcode and remove your plugin.(if that’s all that it is offering)

            My comment was more to recommend that as a plugin creator, using extensible plugins and filters for creating the plugins, would make your plugin much more useful to the masses.

            Hey our plugin cuts off the content you don’t want people to see, or hey our plugin cuts off the content, and here is an example of a filter you can use to add a lock icon, a link to request more information, etc all from our great plugin.. are two very different things.

            At that point you open your plugin to the masses that also create custom implementations of things that you may not have thought of when you created your plugin. They whip up a small plugin themselves that extends yours and bam, now you have a whole new community of people using it. I mean a perfect example is woocommerce. By itself its an ok plugin… but since its extensible, there are literally 1000s of implementations using add on plugins to tweak its features.

            Anyways, Thank you for the recommendation, and hopefully none of this comes off as rude, I am simply offering an opinion on a feature that would be very useful to many of the sites we build.

            1. Hi Jason,

              Thanks for your reply and the suggestions. Don’t worry, I really appreciate it that you have taken the time to explain your points.

              Actually Groups is designed with extension in mind, and among the thousands of installations there are many that are doing exactly that. If you check out the API section of the documentation http://docs.itthinx.com/document/groups/ you will see that there are actions and filters provided. I am sure that we can have more filters, such as to cover the case you have suggested.

              For this particular case I think it would just be quicker and more efficient for you to have the customized shortcode – based on the initial question, it seemed that you were looking for a way to modify the Groups core code itself which I was trying to suggest to avoid.

              I will add the suggested filter to our todo list, in case you would like to suggest an implementation please feel free to fork and open a pull request with the suggested filter added: https://github.com/itthinx/groups/

              Cheers

  42. Very good plugin that we use extensively, but we have made a minor tweak to improve functionality. We are using the groups_group_info shortcode, which displays all user’s userids in specified group, we are modifying line 189 of file /groups/lib/views/class-groups-shortcodes.php changing “user_login” to “display_name” after each update so user’s display names are shown. It would be nice if one of the options included the choice of which to display.

    Thanks.

    1. Hi Louis,

      Instead of modifying Groups’ code itself it’s much easier to simply derive your own version of the shortcode by implementing it within a small plugin. Create a version which differs in name though in order to avoid a clash with the original one. You can find an example here for one of the shortcodes: https://github.com/itthinx/groups-cmember

      Cheers

  43. Hello, Kento!

    Thank you for this plugin – it’s working very well 🙂 But last 1-2 month about 30% of users do not have access to closed pages – there are no restrictions for them.

    Could you help what could be the problem? Maybe some plugin interferes?

    1. Hi Sveta,

      I have seen some cases where a group was deleted and the access restrictions were not removed (for a variety of reasons or conflicts). What you can try very easily is edit a page where this happens, assign a group to restrict access, save the page, then remove the group restricting access and save the page again. This will reset any internal assignments that might be mixed up.

      Cheers

  44. Heloo,
    you plugins seems to be realy powerfull.
    I’m looking for a solution so that users can themself suscribe to groups via forms.
    I’m doing a teaching site and looking to create some kind of path. When they give the right respond (some kind of test) they access automaticly to the second groups. Stuff like this.
    Is there an api call that i can put in my forms that suscribe a user to the next level. I ‘m sure it’s possible (loked to the api) but did not understand realy how to do it. (not pro in coding!)
    can you put me on track ?
    Thanks a lot for this beautyfull peace of code
    (an sorry for my non native english language!)
    ALexis

    1. Hi Alexis,

      Many thanks on your kind feedback on the plugin!

      To assign a user to a group is very easy, you can find an example on top of this documentation page: http://docs.itthinx.com/document/groups/api/examples/

      There is also an example on how to obtain the group by name a bit further below on the page, you can use that to obtain the group ID used to assign the user to a group.

      I hope this helps you!

      Cheers

  45. Hi. How do I make the page accessible to the public when the pages are using Groups? It just says that it can’t find the page if you are not logged in. Thanks.

    1. Hi Tom,

      If a page is restricted to a certain group, it will not be accessible to the general public, this is by design – I would recommend to have a look at the documentation pages to understand how Groups’ Access Control works: http://docs.itthinx.com/document/groups/access-control/

      Cheers

      1. I’m using Groups mostly for admin access filtering.

        This will disable groups check for not logged in users:

        function test_groups($result, $user, $capability){

        // Check not logged in
        if ($user->ID == 0){
        $result = true;
        }

        return $result;

        }
        add_filter( ‘groups_user_can’, ‘test_groups’, 10, 3 );

  46. Thanks for this great plugin
    In WP 4.9.8, we can find in Options nav_menu_item as a post type you can check.

    But once checked, I can’t see the “group” input into my menu items
    How can i restrict menu items to certain groups of users ?

    1. Hi Yannick,

      Nice to hear that you like it!

      Although you can find the nav_menu_item entry under the post types listed, it will not provide an additional option for those to restrict access. Where it’s not a custom link (fixed URL), the access restriction will determine whether the link is displayed or not based on the user viewing the site.

      Cheers

  47. Hi

    Is it possible to use this plugin to counts the terms of a custom taxonomy made by the group. could you please advise on a way to do this.

    Here is a link to the same qestion on the wordpress plugin support page plus the code I use to count the raw post with out groups.

    https://wordpress.org/support/topic/use-the-groups-plugin-2-counts-a-custom-taxonomies-terms-per-group/

    1. Hi Wilhelm,

      On https://codex.wordpress.org/Class_Reference/WP_Query you will find examples of a meta_query added to the query, in the particular case you are asking about, you would use the meta_key = 'groups-read' and meta_value = $group_id with meta_compare = '=' … obviously $group_id would hold the ID of the relevant group; you would use ‘IN’ as the comparison for multiple groups.

      Cheers

  48. On the Group Options page, there seems to be a possibility to include nav_menu_item (ie. menu items). However, when checked, under Appearance > Menus > Menu …, there is no option to select specific groups that should see a menu item … Is this a bug, or simply wishful thinking? I hoped it would work like the ‘User Menus’ plugin, which allows for each menu item to select specific roles that should see that item – including custom links (see https://nl.wordpress.org/plugins/user-menus/)

    I am really having trouble finding a one-stop solution that enables me to show / hide any type of information on my site (ie. media, pages, posts, custom post types, widgets, menus) based on a specific group. The Groups plugin seems unable to limit access to menu items based on groups, the AAM plugin has a similar problem (based on roles). An alternative solution would be to skip groups, create user roles instead of groups, and use the Members plugin by ThemeHybrid to determine which content is shown to who. The ‘User Menus’ plugin could then be used to show or hide menu items. But I would prefer to keep groups and roles separate.

    Please let me know if you know a solution around this.

    1. Hi René,

      For menu items that are directly related to a post type like those you choose from Appearance > Widgets under Posts or Pages, the items will be hidden if the entry is protected itself. If you use Custom Links, the menu items will appear always.

      It’s not related to the Navigation Menu Item / nav_menu_item you see under Groups > Options, at least not yet, although this is something I’d like to have added to Groups.

      I hope this helps to understand how these are currently handled and thanks for asking about it.

      Cheers

      1. Hi Kento, thanks for clarifying this! It would be great if in the future, Groups could also handle Custom links in menu’s, making it a really alround solution. Keep up the good work!

        1. Hi René,

          I agree, we should have this and it’s already on my todo list 🙂

          Cheers

  49. Hi

    I want to know whether users can create group and invite user in his group

    Regards

    1. Hi,

      Thanks for asking, currently not but good to know there’s interest for group invites so I will take it into account for enhancements.

      Cheers

  50. hi support.

    I like to know whether I am implementing the Shortcode correctly.

    I am setting a variable with get_template_part to recall the loop if the logged in user is part of the group.

    see the code below.

    The problem right now is that the loop is being recalled for all users and not just uses belonging to the group.

    1. Hi Wilhelm,

      The code was automatically removed from your comment – can you please provide it via a Gist?

      Cheers

Leave a Reply

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

Share