Your cart is currently empty!
Groups
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”
Hi,
I’ve integrated Groups into a new site, but I just realized that there doesn’t seem to be a way to assign users to Groups on mobile screen sizes. Once the wp admin area displays the mobile layout, the assign users area completely disappears. Any thoughts?
Thank you.
I believe the issue is that the “Groups Bulk Actions Block displays in the .tablenav .top div, which is hidden by default when the screen size shrinks to mobile.
It appears that WP, however, does NOT hide the .tablenav .bottom div on mobile screens, so moving the Groups Bulk Actions Block (…) to the bottom table area would make this responsive for mobile devices. But I’m not sure exactly how to go about making that change.
Hi Dennon,
What plugin are you using to assign new users to the groups? Please give us an url to have a look.
Kind Regards,
Antonio B.Antonio,
I’m simply using Groups from this page (Version 1.10.0). I’m speaking specifically about the wp-admin area where you assign users which is done in the Users tab of the admin area.
You can see what I’m talking about here:
1. Desktop (works fine) – http://imgur.com/rbyZzpe
2. Mobile (Groups Bulk Actions Block isn’t shown) – http://imgur.com/N9hD8UU
Sorry,
I had misunderstood. Thanks, It seems that wordpress removes the above actions on mobile version.
Thanks for the feedback, we’ll have a look at this.
Kind Regards,
Antonio B.Antonio,
Thanks for the update. Not sure if it helps, but I found:
https://developer.wordpress.org/reference/classes/wp_themes_list_table/tablenav/
Might be able to use ( $which = ‘bottom’ ) instead of ( $which = ‘top’ ).
Is there a temporary fix that might be possible before the next update? I have a customer who is complaining because she can’t add users to Groups on mobile.
Thanks again.
Antonio,
I found a temporary fix for this mobile issue in case anyone else needs it.
I added the following to functions.php: http://pastebin.com/9xxNLNU0
Great, We’ll try this.
Thanks,
Antonio B.
Hi,
thansk for the suggestion.
It is not recommended to change the plugin code as it will be lost with updates. But if you want to customize it, if you change the line 203 on class-groups-admin-users.php to:
$box .= 'jQuery(".tablenav.bottom .alignleft.actions:last").after("");';
It display the Groups actions on the bottom.
Kind Regards,
Antonio B.
I think I’ve found a bug that shows up under the following conditions:
(a) groups and groups-file-access are both installed and activated
(b) the plugin directory is symlinkedTo visually see the break under these conditions, load the /wp-admin page and notice the plugin icons on the left column. The one for the groups plugin shows the broken image icon. When you inspect the HTML, you find that the src for that image is an invalid path. That invalid path is the result of what is defined in groups’ constants.php file:
define( ‘GROUPS_PLUGIN_URL’, plugin_dir_url( GROUPS_FILE ) );
This calls plugin_dir_url() in WP’s plugin.php, which in turn calls link-template.php:plugins_url, which calls plugin.php:plugin_basename().
The goal of plugin_basename() is to get the relative path to the plugin_url. Hover, it does that via the following pattern match and substitution:
$file = preg_replace(‘#^’ . preg_quote($plugin_dir, ‘#’) . ‘/|^’ . preg_quote($mu_plugin_dir, ‘#’) . ‘/#’,”,$file); // get relative path from plugins dir
The problem is that under the above conditions, the value in $file isn’t what is expected (the symlink version of the path), and therefore the pattern doesn’t match and therefore the base path is not removed from $file, and therefore, instead of returning the relative path to the plugin at this point, it just returns the value in $file, which will be the absolute, normalized path (not symlinked). This absolute path is what will end up being treated as if it were a relative path later on. When this absolute path is concatenated as if it were a relative path, you end up with the invalid URL to the Groups plugin image in the WP admin panel.
This wouldn’t be that big of a deal (simply a missing icon), but I’m concerned that this bug could lead to other problems, because the bug is the result of GROUPS_PLUGIN_URL being incorrect, which could conceivably lead to other errors in code that makes use of this value.
Possible Solution: make sure groups loads first, before groups-file-access.
Versions used for source code analysis:
– WordPress 4.3
– Groups 1.9.1
– Groups File Access 1.6.0I recently upgraded WordPress core and these plugins and I’m still seeing the same visual results. Presumably, it’s happening for the same reasons as in the earlier versions, but I haven’t traced through the code to verify it. In any case, simply updated versions has not fixed the problem:
– WordPress 4.4.1
– Groups 1.10.0
– Groups File Access 1.6.0Hi Mike,
Thank you very much for your detailed report on that. I’ll take note and check if there’s a feasible solution, although it seems to me that this would rather be something that should be taken into account in the core functions.
Cheers
Hi,
I have a site where a user may belong to multiple groups and there is content that is restricted at group level, and some groups may have multiple capabilities.
What I can’t seem to find in the plugin’s code is a way to get a certain group’s capabilities, so that I can then check if a certain user has at least one of these capabilities.
The only thing I found so far is the function __get() in class Groups_Capability{} which supposedly accepts to retrieve a property (capability) by group ids, but what it seems to actually return IS the group id. Shouldn’t it return instead the array of capability ids if the group id is passed as a parameter?
I’d appreciate a clarification on this.
Thank you.
Hi Andrei,
[Edited]you can use this code, adding it to the functions.php file.
You can do it, ’30’ is the group’s id:
$group = new Groups_Group( '30' );
$caps = $group->__get('capabilities');
Kind Regards,
Antonio B.
I’m considering using your plugin and addons for a website I’m building, and have a few questions:
– Can I create an Admin for that group who can view the users in that group?
– If so, can that admin person then view the meta data for certain fields for each user in that group?
– Can the Admin pay for subscriptions for everyone in that group?Thanks!
Hi Phil,
1.- You could create an ‘admingroupA’ group, and assign it to the groupA admin. Then use the shortcodes [groups_member] and [groups_user_groups].
2.- You could use this custom shortcode ( [groups_users_list_group] ) to create your own solution and display the user data that you want.
3.- Sorry, this option is not available.
Kind Regards,
Antonio B.Thanks Antonio!
Sorry antonio, one more question. Can you just give a quick example of how to use the plugin you suggested in point 2?
Say I want to display all of the names of the users in a group named “thisgroup”, I tried using the following without success. [groups_users_list_group group=”thisgroup”]
I have created the plugin, uploaded it and activated it exactly as suggested, but results aren’t showing. Group has been created too.
Thanks in advance, I really appreciate you taking the time to answer all these questions!
Hi Phil,
You need to use group_id as attribute, something like this[groups_users_list_group group_id="9"]
Kind Regards,
Antonio B.
Hi kento,
Thanks for your reply.
Ben from wcvendors told me to use Groups WooCommerce for the purpose I want, i.e., charging vendors for Listing per item (such as etsy) and create different pricing packs.
So I went to your page and I thought maybe I’llbe able to do it with Groups PayPal without having to buy Groups WooCommerce,
but your answer was enlightening.Kind Regards
Hi,
I want to create a market fashion place with woocommerce + wc vendors.
Besides charging commissions to vendors I also need the option to charge vendors for Listing per item (such as etsy) and create different pricing packs?
For that I was thinking to use Groups free + Groups for WooCommerce.Can I get the same features with Groups free + Groups PayPal?
Kind Regards
Elsa soares
Hi Elsa,
You would not need Groups PayPal as it is used to handle payments directly without WooCommerce. For what exactly would you use Groups WooCommerce in your setup?
Cheers
hey,
I use the plugin to hide part of the product-description from not registred users by tag (i.e. [groups_member group="Registered"]… ) . But now, when I browse to the products without beeing logged in, i get a 404. I am positive that it worked before, maybe I (or a someone else) touched a setting or so. Do you have any idea what we could do what we could have done or how we got or Products back for guests?
Hi Björn,
You have probably set a full access restriction on the product using the Access Restrictions box. Please check if that is so and remove the restricting capability from the product(s).
Cheers
Hello Antonio,
I am using groups, to differ between wholesales customers and normal customers in woocommerce. This is very nice and easy to manage by creating two products, one which is just visible for Registered and one for just Wholesales.
My problem right now is, that I need to show the normal products (Registered Users Products) also for guests! BUT these must be hidden from the Wholesales Users. How can I tell groups to show a product to all groups EXCEPT wholesales?
Thanks a lot.
Best Regards
U.A.
Hi U.A.,
sorry, right now it’s not possible to have negative logic to create excepts. You can do it using the [groups_non_member] shortcode to the content, but it’s not applicable to the entire product.
Kind Regards,
Antonio B.
I’m just curious if we can have Groups automatically assign a group to a user role type when a new user is manually created. For some reason when you create a new user, you can’t add that user to a group from the creation screen but only after they’ve been created. Then you have to add them to a group.
Looking for a way to just have that role type automatically added to that group or have the option to add users to a group upon creating the user manually.
Much thanks in advance.
Hi Mario,
You can use this code as reference to add new users to a group.
If you need to creates group based on role name and assign the new users to these, this is your plugin.
Kind Regards,
Antonio B.Antonio,
As always. Thank you so much!
– Mario
Antonio from the looks of it, the first code snippet will add any new user to the group “Premium”, correct?
I’m just not sure exactly what the plugin does. Is it supposed to add a new user to a group based on it’s role? If so, how can I define the role that automatically gets added to a group?
Much appreciated, Antonio!
Hi Mario,
the first code assign all the new users to the group ‘Premium’.
The second one, create a group called similar to the user’s role, assign the user to this group.
Kind Regards,
Antonio B.
I think I figured out the plugin.
I had to create a new role in order to have the new user be automatically assigned to a specific group. The new role also has to be the exact same name as the group in order for it to work.
Does this sum it up?
Thanks Antonio.
Yes, this is the function.
Kind Regards,
Antonio B.
Hi,
is there any chance how to get groups to add users in admin? I want instead role -> Groups. 🙁
Thanks!
Hi Tomas,
Sure, just note that due to internal limitations you have to create a user first before you can assign it to groups. I know it would be nice to have the possibility to assign groups directly when you create the user, but this is not possible at current. So the process is, 1. create user, 2. edit user and assign to groups.
Does that answer your question?
Cheers
Hi,
I am looking for an easy thing, but maybe I am wrong about it.
I am looking for an easy way to get all capabilities from the current user.
I did that :
$user_id = get_current_user_id();
$user = new Groups_User($user_id);
$groups = $user->__get(‘groups’);// Get Current user capabilities
$caps = $user->__get(‘capabilities’); // or $user->capabilitiesbut this returns NULL for any users.
After having a look to the __get() function, I checked my database, I discovered that my wp_groups_user_capability table is empty.
So, I’m now wondering if the plugin is actually working well ? If yes, where am I wrong ?
Many Thanks,
Sommy
Hi Sommy,
please try$user->capabilities_deep
Kind Regards,
Antonio B.
Thanks Antonio, I’m using that in Woocommerce’s new order template: woocommerce/emails/admin-new-order.php
It appeared to work for some time, but no longer.
Should I move this to functions.php and call it from Woocommerce’s template in a better way? Would that make any difference?
Many thanks again for such a great plugin and such awesome support!
Mark
Hi Mark,
in functions.php is not the correct place. I have added the code here to test your code.
I’m testing your code in admin-new-order.php and it seems to work fine.
Maybe your theme is overwriting this file, be sure you havethe file: wp-content/themes/your-theme/woocommerce/emails/admin-new-order.php
Kind Regards,
Antonio B.
Hi Kento & Antonio,
Thanks for the awesome plugin. I have a small extension request. I have altered the add and edit forms to add some extra options. I’ve done this by adding a few filters and actions, so my code is separated from the groups plugin.
Would it be possible to add the filters and actions in the next update?
For my version see:
groups-admin-groups-add.php (line 117 & 161): https://gist.github.com/ericmulder/dad5eb6e9b2b415a2a18
groups-admin-groups-edit.php (line 156 & 194): https://gist.github.com/ericmulder/9b778fbc7b23837e810aThanks,
Eric Mulder
Hi Eric,
Could you please fork Groups and issue a pull request for the suggested changes? I’ve also check your gists but don’t see any filters or actions added there. Anyhow, I very much appreciate your contribution and please let me know when you’ve issued the pull request to have a look.
Cheers
Hi,
I make a fork and posted a pull request if I did thing correctly.
Eric
Thanks Eric, I’ve had a quick look and it looks good. I’ll do some testing and add it to the next release.
Awesome, thanks!
Hi Kento & Antonio, Awesome plugin. We’re using Groups with Woocommerce and also Role-based methods for payment and shipping etc. I’ve got a very basic question (hopefully). What’s the exact code (with php) to echo a customer’s group on the Woocommerce email template? I just want the merchant to see whether someone is a ‘Special Customer’ or ‘Extra Special Customer’ so they are clear why they are getting their particular discounts. But I can’t work it out for some reason. Best regards, Mark. I was using the below but it doesn’t seem to work any more:
Hi Mark,
this code works fine (I have added this in my functions.php file and the user’s groups is displayed). Maybe you aren’t using the code in the correct place.
Kind Regards,
Antonio B.
Hello,
I notice when using WordPress function get_adjacent_post, previous/next links shows title post that should be restricted.Hi whoaloic,
that’s true. We are working to fix it, we hope to have it available in the new update.
Thank you for the feedback.
Antonio B.
I am having some trouble with blog pagination. It’s the same problem people are having here: https://wordpress.org/support/topic/pagination-broken-with-groups and it looks like it was resolved 2 years ago, but I have the latest version of the plugin and this still happens for me for logins with hidden blog content. The first page works fine but blog/page/2/ etc doesn’t work at all, and gives a 404 error. Any ideas? Thanks.
Hi Jennifer,
please give us an url to have a look at it.
Thanks,
Antonio B.http://primaeyegroup.com/staging/blog/page/2/
But you’d have to be logged in to get to that page. It seems like it works fine for admin, but not for the testuser. Is there an email I can send the login to you?Hi Jennifer,
if I visit your blog as guest, I only can see 3 posts, so page 2 doesn’t exists.
Kind Regards,
Antonio B.Right, because you need to be logged in to see the problem. I can send you a log in if you tell me where to send it.
Hi Jennifer,
sorry I can not log in with your test user. Please send us access to support at itthinx dot com and we’ll have a look (please indicate this conversation in the email).
Kind Regards,
Antonio B.I sent over the login info via email but I haven’t heard back, so I’m just following up. Any progress? thanks.
Hi Jennifer,
asnwered by email.
Thanks,
Antonio B.
Hi !
I just created an add-on for the BadgeOS achievement system plugin.
This Bulk Actions Add-On allows admins to award/revoke achievements to users, according to certain filter.I choose to integrate Groups in it, so we can now target all users of one Groups. (groups are listed and can be cheked).
It is especially handy to reward groups of users for off-line activities, in case of a school for example (where each groups is a group of student).
So, now you have a nice bridge to make some gamification usings Groups, using BadgeOS and this add-on.
Thanks for listening,
and for you great plugin !Hi,
That sounds great, thanks for chosing Groups to do that! Where can people get the integration? I’d love to have a look, too 🙂
Cheers
Hello,
I’d like to hide some menu items for certain groups or based or user capabilities.
I found Menu Item Visibility Control plugin. Unfortunatelly, this plugin is no longer supported.
Anybody could help me please?Hi whoaloic,
right now it’s the best solution. It seems to work fine with the last wordpress version.
We are working in a solution, but I can not give you time estimate.
Kind Regards,
Antonio B.thank you Antonio
must customer purchase their membership first and then come back to the site to then purchase items to get the membership pricing?
or, can the customer purchase their membership in the same shopping cart as when buying some items, but then get the membership pricing for those items during that one shopping session since they are also buying a membership?
would be most cool if both could be done at the same time, an incentive for customers to sign up
thanks
Hi step8601,
users are joined to the groups when the order is processed, so the new prices and advantages of belonging to the group are added after. The user need to do it in two steps.
Kind Regards,
Antonio B.
hi,
just started using your groups plugin.
my goal is to restrict on post / media-level, which should be manageable via capabilities as documented.
but i only can define one single capability on a post / media.
documentation reads that it should be more then one.
what’s wrong?example:
1: media restricted for capabilities:
– CEO
– COUNTRY-US
– COUNTRY-ES2: media restricted for capabilities:
– SUB-MANAGEMENT
– COUNTRY-ES
– COUNTRY-US
– COUNTRY-ITbut that’s not possible. it’s just saving one capability.
please help, thank you!
Hi smo,
in Groups->Options you can select what capabilities you want to be displayed in the posts/pages.
Kind Regards,
Antonio B.hi antonio,
thank your for replying.
i already defined which capabilities should be displayed in posts/pages, and i also can select them.
after updating post/page, just ONE capability is taken and applied.
but not the other selected.
can you follow?any chance i can submit you more information, screenshots with selected capabilities before update and screenshot after update, where just one ist shown?
kind regards,
smoHi,
if you want, you can send us dashboard admin access to support at itthinx dot com and we’ll have a look (please indicate this conversation in the email).
Kind Regards,
Antonio B.hello antonio,
wrote you an email at named email.
just updated to version 1.9.0, but still, nothing better, still same problem.would appriciate some clues how to solve this.
thank you,
smoHi smo,
The custom fields normally synchonize with the values introduced when they are displayed – here’s a screenshot.
So this might be some conflict produced by another plugin. Anyhow, you should be able to circumvent this happening on your particular installation if you simply disable the Custom Fields under Screen Options (disable on your post under Optionen > Benutzerdefinierte Felder). After you’ve done that, you should not see the custom fields and be able to apply the restrictions without the conflict.
Cheers
Is there some way to automatically assign my (already made) custom roles to members of a specific group? To be precise, members who subscribe to a fictional “Client123”-group should automatically be assigned the custom role “client123” that I have already created.
I need this functionality because I hide certain menu-items on my site based on the role of the user. For this I use the “Nav Menu Roles” plugin.
Another way around this would be the possibility to hide menu-items based on the group a user belongs to. Is this a possibility?
Is there a way to assign the 10,139 users within my subscribers role as registered without going through 20 at a time? Thanks!
Hi Jerry,
All users already belong to the “Registered” group, including those that have the subscriber role but also those with other roles. Do you want all subscriber to belong to a particular group?
Cheers
Hello,
I’m trying to import post from a CSV file.
I get this column : cf_groups-groups_read_post but I can’t import more than 1 capability group.Hi whoaloic,
what is the plugin that you are using to import the posts ?
Kind Regards,
Antonio B.I do see in phpmyadmin that capability per post are stored in wp_postmeta table…
But I am using WP CSV: https://wordpress.org/plugins/wp-csv/
In the column cf_groups-groups_read_post, When I export my datas, I only have one capabilty although I set more than 1 capability for some posts.Thanks,
it seems a problem with the WP CSV plugin. I think this plugin only imports postmeta distints, so if you have two or more postmeta with the same meta_key, only import the first.
You could try to import the postmetas with meta_value ‘groups-groups_read_post’ directly in the database.
Kind Regards,
Antonio B.All right, I will write a message in this plugin WP forum.
But I notice the same with another plugin “Post Duplicator”, when I duplicate a post. Only one capability is duplicated…That sounds like the same issue in both plugins.
Allright,
with new release of “Post Duplicator”, it’s OK now!
Hello there!
Do you think it will be able in a future version of the plugin to add capability from the quick edit panel?
Cheers.Hi,
When you create a group, it will in fact create a capability and a group already. It’s intended to make it simpler but we’re moving away from that model in the future to something easier to handle so I don’t think that would be included right there.
Cheers
I was meaning in the panel list of posts, do you think it will be able to add a feature to set capability read from the quick edit panel instead of entering in the post and set the capability in the metabox.
I see, thanks for explaining. You can already do that if you bulk-edit posts.
I’m using a “recent posts” widget on my pages. And I have woocommerce groups installed . All my posts are for group members.
If a user is not part of the member group, I still want to show a list of recent posts in the widget, when they click on it they should be redirected to my page where they can sign up for membership.how can this be done?
Hi Peter,
you could use the groups-excerpts code (you need to add this to your functions.php theme file).
Kind Regards,
Antonio B.Hi Antonio, thank you for the quick response. Much appreciated.
When I add the code, as is, to the functions.php, then all my users, regardless of what group they belong to, see the posts in the “recent posts” widget, and they can click it and read the post.All my posts have read access to group “Members”.
If a user is not in the group Members, then I want them to see the posts in the “recent posts” widget, but when they click on it, they shouldn’t be able to read it, instead a message should show something like “you’re not a member and have no access to this post”I assume I need to change something in the code to reflect the proper group?
I changed ‘Groups_Post_Access’ to ‘Members’ , but that didn’t work.
Regards,
PeterHi Peter,
with this code, the non members users can see the excerpt + “You need to become a premium member to access the full content.”, but they can not see the post’s content.
You don’t need to change ‘Groups_Post_Access’ to ‘Members’. Really you don’t need to change anything.
Kind Regards,
Antonio B.Antonio,
It’s working. very good. It shows the first two lines, with a “continue reading” you click that and it shows ” you need to become a member”
awesome.
thank you so muchPerfect 😉
Hi Antonio, hope you can help me with an issue that arises when you apply your supplied code.
Although it solves the problem that I described, it now causes another issue:
I have a few products in woocommerce, one of them has access restrictions set to group members, I only want to the members to see and be able to order this specific product. Without the code, it works fine. But when I apply the code to the functions.php, then everyone can see and order the product that is assigned to group members. the only thing that is restricted to non-members is the “description” of the product, but they can go ahead and order it. Can the code be modified so that non-members won’t see and won’t be able to order products with access restrictions set to my group members?
thanks,
PeterHi guys,
The issue with the code is that it removes the filters that protect the content, thus the protected products are visible to anyone. As the solution you’re looking for is simply to show a recent posts widget, why don’t you simply derive a widget that bypasses the filters (or removes them and adds them back after it retrieves the posts)?
Cheers
Hi Antonio, Thanks for the quick reply.
I’ve added the code to the functions.php file as you suggested.
Now when a non-member accesses my website, they see all the posts in the “recent posts” widget, and they can click and read all the posts. so that is not correct.
I use Woocommerce to sell a membership, once the user pays for it, they get assigned the group “Member” which has read capability.
All my posts have “members” access restrictions.Do I have to change anything in the code you provided? Do I have to refer to the “members” group somewhere in the code?
Thanks.
Hello,
When groups is enabled, I experience an issue of “Connection Lost” (Media library is extremely slow to reach documents).When I deactivate groups, all works fine.
When I deactivate all plugin, except groups, same issue appears.
I try to switch to default theme, same issue appears.Any idea to resolve this please?
Hi,
Have you checked with debugging enabled to see if anything comes up in your site’s
wp-content/debug.log
? I have no other notice of what you describe happening on other installations.Cheers
Well,
All worked fine together few weeks ago.
I think the issue appears since I have updated to last WordPress version and updated other plugins…
But as I said, when only Groups is enabled, I have the connection lost issue.Nothing to do with plugin using a lot of resource?
I don’t understand what you mean by “debugging enabled to see if anything comes up in your site’s wp-content/debug.log”
Still investigate…
See https://codex.wordpress.org/Debugging_in_WordPress – put these lines in your wp-config.php :
define('WP_DEBUG',true);
define('WP_DEBUG_LOG',true);
define('WP_DEBUG_DISPLAY',false);And then test and see if anything comes up in
wp-content/debug.log
.Also check that you have enough memory enabled for PHP, please see
– http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
– http://docs.woothemes.com/document/increasing-the-wordpress-memory-limit/
Well,
basically, it was due to a SQL base issue.
I don’t know exactly what was the problem but when I paste my datas in another database, it is better…
We have a small problem we purchased your Subscription/Group plugin jigoshop.com it’s not working correctly we need to update one of the 3 components but can login into your site with the credentials we created when we bought your product…further we can’t find any documentation and the documentation link in the plugin returns a 404 page not found…Please advise…
Best,
eMagikHi Craig,
Jigoshop is distributing old versions of our plugins without our consent. After Jigoshop got new owners last year, we had some initial communication but they simply stopped communicating and paying developer commissions since over a year ago now. Sorry but that’s the situation, they’ve been completely unresponsive and as it seems, in this case they leave their clients without support and sell products they can’t or aren’t willing to maintain.
Cheers
Hi guys,
We’re using Visual Composer to build our pages and we haven’t found a short and sweet way to use the “[groups_member group="XYZ"] … [groups_member]” shortcode to hide/display content on pages that uses different Visual Composer elements. It like the shortcode conflicts with the other VC shortcodes and doesn’t behave appropriately.Would you consider adding a Visual Composer block/element for Groups where we could put every VC element we want to hide/show for a given group? Or do you have maybe a way of using the shortcode in order for all VC blocks within the Groups shortcode in a text element to display/hide appropriately?
Waiting for your feedback!
Cheers,
BHi Bastien,
There’s an extension which hasn’t been published yet for this. Let me check if I can provide you with a copy so you can test it.
Cheers
Hey Kento,
Thanks for the reply. Do you have any news about this extension?
Kind regards,
BHi Bastien,
Thanks for following up, not yet but I’ll let you know as soon as possible.
Cheers
Hello Kento,
I don’t want to sound pushy but I’m a bit stuck here without that extension… 🙁
Do you have any ETA of when I could test this?
Thank you.
B
Hi Bastien,
Sorry for the wait and thanks for the reminder. I’ll check and email you.
Cheers
Please can you publish this extension somewhere? Thanks!
Hi Francesco,
The last Visual Composer version allows you to add shortcode easily. Here you have a video where you can see how to do it (it’s in spanish, but you can see how to do it).
Kind Regards,
Antonio B.
I second this 😉
Hi Antonio,
Is there a way to reverse the access?? So I have two pages, one should only be visible to guests/ unregistered and one i available for the two groups i created.
I have figured out how to NOT show the page or menulink for the group page. But I am struggeling with Not showing the guest page when someone is logged in in his/her group.Can you give me a tip?
Thanks!
Bram
Hi Bram,
you can use Menu Item Visibility Control plugin using this code: current_user_can(‘your_capability’);
Regards,
Antonio B.I’ve installed this plugin and have inserted the code above associated with the capability I created, but all items in the menu are showing while ignoring the group capability. I also can’t find current_user_can on this list here: http://codex.wordpress.org/Conditional_Tags
Is there a different code I should be using?
Hi Ideation,
‘current_user_can’ is not a conditional tag, it’s a Group’s function.
It should work fine, I have test with:current_user_can('Premium')
and only the users with ‘Premium’ capability can see this item menu.
Kind Regards,
Antonio B.
Hi
We are already using Groups & Groups for WooCommerce, so that when our membership products are purchased, users are dropped into a specific Group and can then be emailed on a targeted basis. If registered users have made no purchase, at the moment they just get standard English language email newsletters.
Using WPML, we are now going to create additional language versions of the site, but the issue will then be that the registered users will be from different countries and we would like to email them in their native language with coupons etc to sell our memberships.
With the WooCommerce shortcode ‘billing_country’ we can add this field to the registration page form, so if we then create the necessary “registered-country” groups, can we automatically add users to these when they completes the registration?
Hi Paul,
Groups hooks on the ‘user_register’ action to add a user automatically to the ‘Registered’ group. You could add another action in a similar manner so that the user is added to the group based on the info from the ‘billing_country’ field.
Cheers
Hi
Thank you and I have now reviewed the Woocommerce docs about how to do this. Not having done this before though, a couple more questions please:
1. I add these to our child theme functions.php file?
2. Woo says there are 2 types of hook – action & filter – so which do we use?
3. Can you confirm that the hooks will only function on the Register form and NOT the Checkout form, as we have set users completing a purchase to go into a Member group.
4. Can we also set some functionality so that when Membership Subscriptions expire, the users drop back into the correct new “Registered Country / Language” groups?Thanks
PaulHi Paul,
1.- Yes, you should add your code in this file.
2.- ‘user_register’ doc page. Here a code how to add new users to Premium group.
3.- Please have a look at Woocommerce Hooks page.
4.- Here you have info about subscriptions hooks.
Kind Regards,
Antonio B.
[…] to provide an Answer (unless someone is familiar with this plugin). Hopefully, you already read the documentation and checked the code, […]
We’ve purchased the WooCommerce groups and subscriptions. We have a members only area and would like to have a page that displays a list of member contact information. Is that possible with any of your plugins?
Thanks!Hi Todd,
For this you could protect the page using Groups and include the shortcode provided through https://github.com/itthinx/groups-list-users for example
[groups_list_users group="Registered"]
– the information displayed can be extended by modifying the plugin itself.Cheers
That worked for me but the list seems to be sorted by an id. Is there a way to sort by different columns?
Yes, you could write a helper function for use with uasort that uses the column you wish to sort by.
Hi,
I know that content can be restricted at a page or page content level, but what about things like widgets that are assigned to certain footer areas?
For example I would like to show certain user groups a certain contact info that is displayed via a footer widget, and then show a different group some other contact information instead.
Any ideas?
Thanks.
Antonio,
Thank you, that’s great I will look into it.
Hi,
I am aware of the Access Restrictions panel that allows you to select groups that ARE allowed access.
However, what if instead I would like to select only those that ARE NOT allowed access?
For example, if I have 20 groups and 18 of them have access, I would much rather select the 2 that do not have access instead of having to click through all the 18.
Any ideas?
Thank you.
Hi Andrei,
if you want to use negative logic, you can do it using the shortcode [groups_non_member].
Kind Regards,
Antonio B.Antonio,
Thanks, I was aware of that shortcode, but I was hoping of something more at a page level. I am using a page builder that doesn’t really allow me to enclose the various building blocks in a shortcode.
It would be nice to have a checkbox within the Access Restrictions panel that would allow to use the panel as normal OR as a negative logic.
Hi Andrei,
sorry, right now it is only available with shortcodes.
Regards,
Antonio B.Is there any possibility of adding a “Deny” function to the widget?
We are migrating to a WooCommerce platform and this would solve a huge problem related to products that we want to have available to retail and unregistered customers and NOT available to wholesale customers. (There is a different product that we want them to see).
We would very much like the deny function to apply to entire posts (products) as well as inline content.
Thanks–Gary
Hi Gary,
Regarding the widget, we’re about to release an extended version of Widgets Control which also allows to show a widget based on group membership. Is that what you’re asking?
Cheers
Hi, thanks for your work on this plugin. Is it possible to list groups by parent? Something like [groups_groups parent="1"]? If not, is it sensible for me to modify the plugin and add this?
Thanks,
MarkHi Mark,
you can use this code ( you need to add it in your functions.php file and use the shortcode: [groups_groups_parent parent_id=”XX”] )
Kind regards,
Antonio B.
Hi, is it possible to redirect a group user after login to a specific page(url)?
Hi Katerina,
you could use the Groups API and login_redirect filter to create your own solution.
Kind regards,
Antonio B.
Answer to my own comment, which I can’t see even if I visint the link: http://www.itthinx.com/plugins/groups/comment-page-12/#comment-668379
Kento,
you said that, assuming the groups Basic and Advanced which is a child group of Basic. Users from Advanced would not be able to see content restricted to Basic. I understand fully.
But will people from Basic have access to content restricted to Advanced? Meaning that if I create an Admin group and VIP group which is child group of Admin, the users in Admin group will be able to see the content restricted to VIP?
Hi Jean,
in your case, if you have Admin -> VIP (child of Admin).
Admin’s users can see posts/pages in: Admin
VIP’s users can see posts/pages in: Admin, VIP
Kind regards,
Antonio B.
Does explicit membership in a sub-group give implied membership to the parent group?
I ask because I have a parent group with a number of subgroups. I would like some content to be visible to users who have membership in any of the sub-groups. It would be easiest if I could simply query membership in the parent group, rather than in each of the sub-groups. To do that, do I need to explicitly assign the user membership in the parent group AND the sub-group? Or is sub-group membership sufficient that a query on parent group membership will return true even if I haven’t explicitly granted that user membership?
Hi Marcus,
It depends … capabilities are inherited through subgroups (see Groups Hierarchy) so if you have protected a page by using a capability that is assigned to a parent group, then a member of the child group will be able to access it. But not the other way round.
Cheers
Pre-purchase question:
I know there is a group hierarchy, but does it work too with the post restrictions where you use the shortcodes to put the restricted content inbetween?
Hi Jean,
For example, assume the groups Basic and Advanced which is a child group of Basic. If you use the shortcode
[groups_member group="Basic"]Content for members of the Basic group[/groups_member]
, then a member of the Advanced group which does not belong to the Basic group, will not see the enclosed content. If you want a member of either Basic or Advanced to see the content, you would use[groups_member group="Basic,Advanced"]Content for members of the Basic or Advanced group[/groups_member]
.Cheers
I want to use the plugin with Woocommerce.
Can I use the plugin to let sellers sell products on the shop?
they need to ask to be able to sell products and the site manager need to approve them.
(you give support here, on the plugin page on WordPress or other place?)Hi Rob,
sorry, I think it’s not your plugin, I think that you need Woocommerce Product Vendors plugin.
Kind regards,
Antonio B.
[…] you are using Groups by @itthinx and you need to filter the feeds, this code can help you: function my_feed_filter ( […]
Hello!
I use your plugin in an extranet website.
Each member is registered manually with its group capabilities.
I have a mailchimp account and I would like to use RSS driven campaigns.
I already have mailchimp lists where subscribers are registered manually (I don’t use a subscription form because I want to control which user is allowed to see specific content).
I mean that I use
My idea is to create mailchimp RSS driven campaigns per mailchimp list.
So each list matches with each group.
For example, I get posts with restrict access “Premium” (or capability “premium_read”) so I would like the mailchimp list “Premium” would receive a RSS driven campaign of posts with “premium_read” capability.
Is it possible to set a capability as a feed ?Thank you very much for your help.
Hi whoaloic,
with this code, the feed posts are filtered by groups. Maybe it can help you.
Kind regards,
Antonio B.I’m interested in this topic as well, however, my problem doesn’t have to do with the filtering of the results (though I may come across that issue in the future). Right now I’m just having a hard time getting MailChimp (or Campaign Monitor) to be able to see the RSS feed when it’s behind the password protection of Groups (by itthinx).
Has anyone found a way around that? Currently when I try to setup an RSS driven campaign, it errors out saying the feed is not valid. Presumably this is because it is behind the Groups password protection and there currently is no method that MailChimp or Campaign Monitor provides to authenticate the RSS feed request.
If anyone has any ideas about how to get around this, I would greatly appreciate it!
H Aj,
really I don’t know how to identificate in RSS.
You can try to disable Groups, to check if the error is generated by this plugin.
Regards,
Antonio B.
I’m currently using Groups with bbPress and the plugin limits forums like a charm! My one question though, is there a way I can get topics and replies to adopt the forums group?
Even though forums are limited topics are still visible by all!
Hi Kevin,
bbPress uses three different post types for forums, topics and replies. Groups does not relate these based on the forum and thus the access restrictions don’t apply to the related topics or replies. It should be possible to make that work, but it would require an integration of bbPress with Groups for that purpose.
Cheers
Hi, there is a bug 🙁
I created the MyPage, set group to ‘newgroup’.
This group was created.Than I went to Groups and deleted newgroup.
MyPage is disappeared. I see number of pages: 8, but actually I can see only 7, without MyPage.
I disactivated Groups. And MyPage is there again!
/Denis
Hi Denis,
I tried that and not occurs to me the same. Please be sure you have the lastest versions.
Kind regards,
Antonio B.Yes, it’s the latest version.
I deleted from wp_postmeta, where
meta_key = groups-groups_read_post
meta_value = reg(reg is my deleted group)
And it works again.
I’m glad that it works.
RegardsOne more issue. I have BuddyPress (permanent links are enabled)
https://site/members/denis/messages/
https://site/groups/dairy/
https://site/activity/All this link are linked to pages here
https://site/wp-admin/admin.php?page=bp-page-settingsEach page has capabilities ‘payed’
The new register user doesn’t have ‘payed’ in his groups.
But he could open and see these pages 🙁
Yes.. I have run into an issue with the Groups Plugin and am trying to get assistance…
I am using a WordPress Theme Called Directory+http://preview.ait-themes.com/index.php?bartype=desktop&theme=directory
This is basically a business directory theme with features built in to add this functionality. Within the WordPress Admin the theme adds a menu item named “Items” which holds the Business Directory Items/Categories/Locations. For some reason, when I enable the Groups Plugin, this entire “Items” menu disappears from the admin menu. This took me awhile to figure out because I have quite a few plugins. By process of elimination, I was able to determine that when I have the Groups Plugin enabled, this “Items” menu item disappears. As soon as I disable the Groups Plugin, this item comes right back!.
I am trying to setup the site with WooCommerce Subscriptions to manage members of the organization, whom as part of being a member, receive a page within the business directory for their company. When installing WooCommerce Subscriptions, it says that the Groups Plugin is required so I installed it but then my Business Directory (or “Items”) menu disappeared.
Please provide any assistance you can… many thanks in advance.
Hi Ryan,
If the items menu disappears, then it might by that you have any restriction set on the root menu item? Otherwise this would be a conflict between the theme and Groups. I would first check if you have any restrictions set and maybe you can ask the theme developer for any guidance on how they are creating the menu to see where a possible conflict may arise.
Cheers
Hello,
I am looking to restrict access by custom post type. Restricting access on a post-by-post level will soon become difficult to manage.
Is there a way to easily restrict access to every post created from a specific custom post type? If so, can this be done with a snippet or a plugin/extension that currently exists?
Hi Mario,
you can use this code as reference (you need to change the ‘Premium’ capability and “posts” by your cuatom post type).
Kind Regards,
Antonio B.Antonio, that’s incredible. Thank you so much!
Perfect 😉
I’m using Groups with the WooCommerce extension, and have run into a problem. It’s possible for someone to order membership (which adds them to a special group) and a physical product in the same order. The provisioning system I’m using for physical products puts the order in “pending” state until the order ships, and the user is not added to the members group immediately.
I have added these users to the group using the bulk edit feature, but am having issues with ONE user. He is able to see the group-restricted forum (bbpress) fine, but unable to see a group-restricted page (it redirects using the Groups 404 Redirect extension). I’ve had him try on his phone and his computer, and in Safari and Firefox with the same results.
Any suggestions for clearing up this problem?
Hi Jeff,
in Woocommerce->Groups you can select the status needed to add/remove the user to/from a group.
Regards,
Antonio B.
Hi,
I am using currently the Groups plugin with a couple of extensions on a private site that requires login to be viewed. I am looking to create two additional sites that will share possibly the same user and user meta database.
The idea is that some users will have access to one, two or all sites, depending on what Groups they’re assigned to.
Is this something that is possible with the Groups plugin or how should I go about it?
Thanks.
Hi Andrei,
Given that we don’t have a RESTful or similar API integrated in Group yet, you’d have to cook your own solution. I’ve heard someone mention shared database tables but am not sure how stable that would be and how much sense that would make for your setup. You could also build some API points yourself so that when site 2 needs to ask about group membership for a user, it would call site 1 and get the required info. Not a simple task but it could be done, I hope that helps somehow.
Cheers
Hi!
For now, when I add a registered user from backend, I have to submit the new user creation, then go back to the user profile, and select groups in which he/she belongs.
Is there an existing add-on to add users in groups from a respective group page so that adding users in groups would be easier.Hi,
That would be great to have but is technically not feasible because the way WordPress works on the screen where you add a user doesn’t allow us to add customized options easily. It’s something I’m thinking of providing outside that framework but it’s not available yet. Thanks for asking, this has been suggested previously and I’d like to have a solution to it soon.
Cheers
Thank you for your answer kento!
I indeed notice that screen for adding user in the backend only shows default WP user fields.
Other plugins that I already test which add custom fields to users (like Woocommerce) works like Groups plugin.
when adding a registered user from backend, I have to submit the new user creation, then go back to the user profile, and adding custom informations.
Leave a Reply