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. Ian October 31, 2019 at 6:34 pm #

    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,

    • Kento November 1, 2019 at 10:07 am #

      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

      • Ian November 1, 2019 at 11:14 am #

        Hey Kento,

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

        Kind regards,
        Ian

      • Ian December 12, 2019 at 3:53 pm #

        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.

        • Kento December 13, 2019 at 10:37 pm #

          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. Alice October 24, 2019 at 7:47 pm #

    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

    • Kento October 25, 2019 at 11:46 am #

      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

      • Alice October 25, 2019 at 1:54 pm #

        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

        • Kento October 25, 2019 at 3:50 pm #

          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

          • Alice October 25, 2019 at 4:36 pm #

            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

            • Kento October 27, 2019 at 8:17 pm #

              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

              • Alice October 28, 2019 at 4:23 pm #

                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

                • Kento November 1, 2019 at 10:31 am #

                  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

    • Ian November 1, 2019 at 12:07 pm #

      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!

      • Kento November 1, 2019 at 5:19 pm #

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

  3. Ivan October 4, 2019 at 7:45 am #

    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.

    • Kento October 8, 2019 at 8:30 pm #

      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. Rick Rome September 27, 2019 at 10:22 pm #

    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

    • Kento October 8, 2019 at 8:41 pm #

      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. RickRome September 23, 2019 at 1:39 am #

    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

    • Kento September 23, 2019 at 11:56 am #

      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. Augus August 18, 2019 at 4:57 am #

    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.

    • Kento August 19, 2019 at 8:59 pm #

      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 August 13, 2019 at 4:46 pm #

    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

    • Kento August 17, 2019 at 3:11 pm #

      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. Rick B August 2, 2019 at 7:20 pm #

    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/

  9. rachel July 22, 2019 at 3:14 pm #

    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?

  10. John June 11, 2019 at 7:01 pm #

    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.

    • Kento June 13, 2019 at 8:18 pm #

      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

      • John June 13, 2019 at 9:22 pm #

        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.

        • Kento June 14, 2019 at 8:51 pm #

          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. Web May 28, 2019 at 4:26 pm #

    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()

  12. Alex May 25, 2019 at 4:27 pm #

    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!

  13. Manoj May 24, 2019 at 4:58 pm #

    Is there a way i can get all groups array.

    • Kento May 24, 2019 at 6:24 pm #

      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/

      • Manoj May 24, 2019 at 10:13 pm #

        Yes, it worked. Thankyou.

  14. Anthony Randall May 16, 2019 at 9:38 am #

    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

    • Kento May 18, 2019 at 12:44 pm #

      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. Lynne May 7, 2019 at 8:50 pm #

    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!

    • Kento May 13, 2019 at 4:52 pm #

      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. MM May 2, 2019 at 7:49 pm #

    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!

    • Kento May 2, 2019 at 8:45 pm #

      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

      • MM May 2, 2019 at 8:56 pm #

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

  17. Michael Broughton April 11, 2019 at 7:11 am #

    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!

    • Kento April 22, 2019 at 7:48 pm #

      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

      • michaelbroughton April 23, 2019 at 10:22 am #

        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

        • Kento May 2, 2019 at 7:55 pm #

          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

          • Michael Broughton May 3, 2019 at 12:51 am #

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

            Michael

          • Michael Broughton May 10, 2019 at 5:13 am #

            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

            • Kento May 13, 2019 at 4:12 pm #

              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. REDA March 20, 2019 at 9:23 am #

    Hello,

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

    thanks

    • Kento March 20, 2019 at 11:02 am #

      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 March 13, 2019 at 4:11 pm #

    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.)

    • pavel_lishin March 13, 2019 at 4:47 pm #

      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.

      • Kento March 17, 2019 at 6:54 pm #

        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

        • Pavel March 18, 2019 at 1:16 am #

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

          • Kento March 19, 2019 at 3:15 pm #

            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. Afolabi Osinowo February 27, 2019 at 3:53 pm #

    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!)

    • Kento March 5, 2019 at 9:06 am #

      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. Joy February 23, 2019 at 4:14 am #

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

    • Kento February 25, 2019 at 9:16 am #

      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. Joe February 22, 2019 at 2:19 pm #

    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!

  23. optec February 20, 2019 at 12:38 pm #

    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

    • Kento February 25, 2019 at 9:35 am #

      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. Dennis Argue February 16, 2019 at 9:43 pm #

    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…

    • Kento February 26, 2019 at 1:06 pm #

      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. Ricky February 12, 2019 at 8:01 am #

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

    • Kento March 5, 2019 at 8:50 pm #

      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. Robbie February 11, 2019 at 1:48 pm #

    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

    • Kento March 5, 2019 at 9:12 pm #

      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. Michel February 8, 2019 at 1:33 am #

    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!

    • Kento March 5, 2019 at 9:14 pm #

      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

      • Ian October 31, 2019 at 6:29 pm #

        Hi Kento,

        Is there any update on this functionality?

        Kind regards,

        • Kento November 1, 2019 at 10:05 am #

          Hi Ian, this is still a work in progress …

  28. Jonathan February 5, 2019 at 2:44 pm #

    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.

    • Kento March 5, 2019 at 9:39 pm #

      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 January 22, 2019 at 12:05 pm #

    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,

    • Kento January 24, 2019 at 9:31 am #

      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. Brian January 8, 2019 at 6:59 pm #

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

  31. Alex December 31, 2018 at 7:33 pm #

    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!

    • Kento January 9, 2019 at 3:40 pm #

      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. Rick December 27, 2018 at 9:12 pm #

    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

    • Kento December 31, 2018 at 12:48 pm #

      Hi Rick,

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

  33. Rick December 27, 2018 at 2:46 am #

    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.

    • Kento December 27, 2018 at 12:59 pm #

      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. Vincent H December 11, 2018 at 3:07 pm #

    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

    • Kento December 17, 2018 at 1:42 pm #

      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. Humberto Oceguera December 8, 2018 at 1:28 am #

    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

    • Kento December 9, 2018 at 12:27 am #

      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

      • Humberto December 10, 2018 at 8:00 pm #

        I think that did it!…

        Thanks for the fast response 🙂

        • Kento December 10, 2018 at 8:43 pm #

          Great to hear that! 🙂

          • Humberto May 26, 2019 at 12:34 am #

            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.

            • Kento May 29, 2019 at 10:22 am #

              Hi Humberto, this looks ok to me 🙂

          • Humberto May 26, 2019 at 12:37 am #

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

            • Kento May 29, 2019 at 10:23 am #

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

  36. Nicolás November 27, 2018 at 1:02 pm #

    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!

    • Kento November 27, 2018 at 4:10 pm #

      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

      • Nicolás November 27, 2018 at 5:50 pm #

        Excellent I’ll do that !

        Thanks a lot for the quick reply

        =D

  37. Chris Norris November 22, 2018 at 4:27 am #

    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.

    • Kento November 22, 2018 at 8:59 am #

      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

      • Mary-Ann June 19, 2019 at 8:18 pm #

        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.

        • Kento June 20, 2019 at 4:04 pm #

          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

          • Mary-Ann June 20, 2019 at 7:10 pm #

            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

            • Kento June 26, 2019 at 1:11 pm #

              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. sachiese November 15, 2018 at 1:29 am #

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

    Looking forward to the future updates!

  39. sachiese November 13, 2018 at 12:14 pm #

    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?

  40. Sally Law November 8, 2018 at 9:07 am #

    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

    • Kento November 10, 2018 at 10:39 am #

      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. Jason November 5, 2018 at 12:27 am #

    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.

    • Kento November 10, 2018 at 10:22 am #

      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

      • Jason November 15, 2018 at 6:33 pm #

        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…

        • Kento November 16, 2018 at 4:12 pm #

          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.

          • Jason November 16, 2018 at 4:45 pm #

            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.

            • Kento November 22, 2018 at 9:36 am #

              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. Louis October 29, 2018 at 6:17 pm #

    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.

    • Kento November 10, 2018 at 10:42 am #

      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. Sveta October 21, 2018 at 10:03 am #

    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?

    • Kento October 25, 2018 at 9:59 pm #

      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. Alexis October 18, 2018 at 7:22 am #

    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

    • Kento October 25, 2018 at 9:49 pm #

      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. Tom October 4, 2018 at 8:02 pm #

    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.

    • Kento October 12, 2018 at 5:21 am #

      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

      • Victor W16 January 31, 2019 at 5:11 pm #

        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. Yannick October 2, 2018 at 11:33 pm #

    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 ?

    • Kento October 10, 2018 at 5:45 am #

      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. Wilhelm September 25, 2018 at 12:06 pm #

    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/

    • Kento October 12, 2018 at 5:46 am #

      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. René September 17, 2018 at 11:32 am #

    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.

    • Kento September 19, 2018 at 7:30 pm #

      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

      • René September 20, 2018 at 1:15 pm #

        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!

        • Kento October 12, 2018 at 5:58 am #

          Hi René,

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

          Cheers

  49. Giant August 22, 2018 at 12:38 pm #

    Hi

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

    Regards

    • Kento August 22, 2018 at 5:31 pm #

      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. Wilhelm August 16, 2018 at 4:40 pm #

    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.

    • Kento August 22, 2018 at 7:50 am #

      Hi Wilhelm,

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

      Cheers

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