A few days ago, I got a comment on my other plugin “Limit blogs per user” that it would be great to have something to limit the number of groups a user can create. So, here is the plugin to allow you limit the maximum number of groups a user can create on the BuddyPress based social network. Thanks to mika for the suggestion.
What It does:-
This plugin allows site admins to restrict the maximum number of groups a user can create. Once the User has created allowed number of groups, he will no more be able to create new groups.
How it works:-
It checks for the allowed number of groups and the no. of groups a user is admin. Once the User reaches the limit, this plugin will remove the BuddyPress action which handles group creation and show an error message.
How to Use it
- Download Limit Groups Per User
- Unzip it and upload limit-groups-per-user to wp-content/plugins
- Login to WordPress backend.
- Go to Dashboard->Plugins and activate Limit Groups per user(activate sitewide if BuddyPress is activated sitewide with Multiblogs enabled)
- Go to Dashboard->BuddyPress ->general settings and enter the number of Groups you want to limit.
- Have fun! no, wait, you will need to add following to your theme/groups/index.php since buddypress default theme does not include this action on directory pages.
<?php do_action( 'template_notices' ) ?>
It is used to show the error message to the user.
The admin option to limit the number of groups. You can access it via Dashboard->BuddyPress->General Settings
And here is the error message shown to the user if he exceeds the number of groups allowed
Hope It will be useful for a few of you 🙂
Looking forward to your feedback 🙂