Groups Restrict Categories

Groups Restrict Categories features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.

This extension based on Groups is useful if you want to restrict access to whole categories and their related posts. Beyond categories, it also allows to control access to other taxonomies like tags or those that are provided by third-party extensions in the form of custom post types and taxonomies. Menu

If you are using the popular WooCommerce, you can use this extension to restrict access to products by Product Categories or Product Tags. This can be useful if you have certain products which only specific customer groups should be able to purchase, like exclusive products and packages for wholesale and distributors.

Documentation

Read more about how this plugin is used in the Documentation.

Download

This premium extension is available in the Shop.

Screenshots

New access restriction options

Edit Category

Enabling access restrictions by taxonomy

Taxonomies

182 Responses to Groups Restrict Categories

  1. Jerome C. September 20, 2016 at 10:35 pm #

    Hello,

    I am using Groups and Groups Restrict Categories to restrict access to user groups through categories on our Intranet.

    It works well, for the most part. For example, users in the Project Manager group are unable to see posts with the Sales category, while users in the Sales Manager group can. So far so good.

    The problem is that if a Project Manager happens to search for an expression that is found in the title of a post assigned to the Sales category, then that post’s title is displayed in the search results page, even though that user should not have access to it. Only the title is displayed; the excerpt is not. If that Project Manager clicks on the title (it has a hyperlink to the post), then they reach the “Not found page”, which is good.

    Note:
    Our search results page normally displays the Title and the Excerpt of the posts found, as long as the user has access to them.

    My guess is that there is a function somewhere that may override the Groups Restrict Categories “title” filter somehow. But I haven’t been able to find anything like that so far.

    I wonder if you can give me some pointers on how to find out why restricted post titles can be searched by a user who does not belong to the correct group and who does not have the correct read access associated to the post’s category either.

    Any help would be greatly appreciated!

    • Kento December 22, 2016 at 8:04 am #

      Hi Jerome,

      Is it possible that you have a customized search which bypasses the way posts are obtained (e.g. directly polls the database)? Do you use any particular search plugin? Actually, if you’d like to give it a try, you could also install our Search Live plugin and test its widget to see if these posts show up as well.

      Please let me know if that helps.

      Cheers

  2. Jerome C. November 1, 2016 at 9:41 pm #

    Hello,

    I posted a request here some time ago but never got a reply.

    Basically, there is an issue where the title of a restricted post is displayed in the search results, even if the user does not have access permission the the post’s category. When the user clicks on the result, they are redirected to the Not Found page.

    Since my initial request, I have found that the error might be caused by a Search plugin. At the time, I was using Relevanssi. Once Relevanssi was disabled, Groups Restrict Categories started behaving as it should: the restricted posts’ titles were no longer showing up in the Search results page.

    I also tried using Ajax Search Lite and the same problem occurred.

    Is this a bug in GRC? If not, would you be able to recommend another search plugin that will work with GRC and not display the title of restricted posts?

    Thanks in advance!

    • antonio November 3, 2016 at 7:56 am #

      Hi Jerome,
      Have you try our Search Live plugin ?
      Kind Regards,
      Antonio B.

  3. snecz December 13, 2016 at 8:23 am #

    I try to find a solution for this functionality my WooCommerce shop: Some of products can be watched in the shop but can ONLY be purchased when somebody buy at least one other product.

    So for example I have: Category A: Product A1, Product A2, Product A3 Category B: Product B1, Product B2, Product B3

    All products have prices and are not gifts.

    I want to: Products that can be be sold with no conditions: Product A1, Product A2 Products that can be sold ONLY when Product A1 or/and Product A2 is purchased: Product A3, Product B1, Product B2, Product B3

    There’re Product Bundles And Chained Products plugins but I think both of them lack of something. Is Groups Restrict Categories suitable for this task?

    • antonio December 20, 2016 at 9:40 am #

      Hi snecz,
      sorry, the plugin hasn’t this functionality.
      Kind Regards,
      Antonio B.

  4. Ben February 11, 2017 at 3:39 pm #

    Hi, I’m wondering if your plugin can do the following:

    One User – member of 2 groups – A and B
    Post with 2 categories X and Y

    Group A allows read access to category X
    Group B allows read access to category Y

    Can your plugin enforce BOTH? So that the post with X and Y categories can only be viewed by a user with BOTH access, and not just one?

    Thank you

    • antonio February 13, 2017 at 11:32 am #

      Hi Ben,
      Yes, you can do it with this plugin.
      Kind Regards,
      Antonio B.

  5. Ben February 13, 2017 at 6:47 pm #

    Thank you. Do you offer any money back guarantee?

  6. James February 13, 2017 at 6:55 pm #

    Can I use this plugin to control access to media files?

    • antonio February 14, 2017 at 9:44 am #

      Hi James,
      If you want restrict access to file, please have a look at Groups File Access.
      Kind Regards,
      Antonio B.

  7. Joel Worsham February 14, 2017 at 4:37 pm #

    Is it possible to not give the user a 404 if restricted, but rather redirect to the signup page like when viewing restricted pages?

    • antonio February 16, 2017 at 8:29 pm #

      Hi Joel,
      You have available the Groups 404 redirect plugin.
      Kind Regards,
      Antonio B.

  8. Paul May 14, 2017 at 12:15 pm #

    Hi there,

    I have a mature WordPress Parish Council website up and running. I have been asked to create a restricted area that allows Councillors of the Parish to access specific content just for them.

    The Restricted Categories plugin seems to fit the bill but I do have a couple of questions please.

    1) Once installed the plugin won鈥檛 affect posts already created? That is to say I won鈥檛 have to go back through everything and tick/untick/reassign previous posts.
    2) The documentation doesn鈥檛 mention how members access the restricted category. Is there a group login page? Is it done through the User accounts? How do I allow a group of 9 Councillors all access the same posts?

    Thank you for your help.

    Cheers鈥aul

    • antonio May 16, 2017 at 11:03 am #

      Hi Paul,
      To restrict access to pages, you need the Groups plugin, please have a look at the documentation page.
      If you need to restrict pages based on their category, then Groups Restrict Categories is your plugin.
      1.- The posts/pages already created will not be modified, so they will remain open access. When you install a new plugin, I recommended that you always make a full backup.
      2.- From the Groups documentation page you can see how to use this plugin. Using the shortcodes you can create your own pages.
      Kind Regards,
      Antonio B.

  9. Walter May 24, 2017 at 8:07 am #

    Hi Antonio,

    i use WC (German Market) with the Plugin “Deposit for WooCommerce Products” (https://de.wordpress.org/plugins/pfand-deposit-for-woocommerce-products/). Is it possible, to disable the deposit for specific Customer Groups? The deposit is a custom taxonomy.

    • antonio May 25, 2017 at 8:28 am #

      Hi Walter,
      If Deposit is a custom taxonomy, this should work fine. If a product is associated to a restricted deposit, then this product will be restricted.
      Kind Regards,
      Antonio B.

  10. Sergio August 8, 2017 at 9:41 am #

    Hola,

    If a post / page is restricted to a group_A, then only the users on this group_A or group_A_1 / group_A_2 … (children of group_A) can access this post / page.

    Using the categories plugin, if I create a new post and assign it the category group_A, users of group_A_2 for example (that has assigned the category group_A_2), will be able to read it?

    I do not know if I explained well.

    Thanks.

    • antonio August 8, 2017 at 3:47 pm #

      Hi Sergio,
      That’s right. This works like the post/page groups restriction.
      Kind Regards,
      Antonio B.

  11. alexandre August 14, 2017 at 8:09 am #

    Hello
    I’m using the groups restrict categories add-on and I would like to know if parent categories can be used to block child categories.

    Thanks

    • Kento August 17, 2017 at 3:26 pm #

      Hi,

      The parent category access restriction does not imply restriction of its child categories. If you want to protect the child categories, please make sure to apply the same restrictions as in the parent category.

      Cheers

  12. Lee January 1, 2018 at 3:48 am #

    Hello

    I’ve been using Groups Restrict Categories but the subscription has now expired. I would have renewed it but for the fact that it has started to generate huge error logs that I have to delete everyday. This has something to do with woocommerce and I think it started when it got to version 3.
    Basically woocommerce generates an error file everytime someone adds something to the cart – there is no indication that anything is amiss apart from the error file and it only happens when your plugin is active. Here is the message (it also shows it multiple times for each single instance of adding 1 peoduct into cart so you can imagine how big the file is each night – between 6 and 10 gigs)

    “id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘wp_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Cart_Session->get_cart_from_session, WC_Product_Variation->is_purchasable, WC_Product->is_purchasable, apply_filters(‘woocommerce_is_purchasable’), WP_Hook->apply_filters, call_user_func_array, Groups_Restrict_Categories::woocommerce_is_purchasable, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.”

    As mentioned it only does it with your product and only mentions the restrict categories product. I am using version 2.01 of the product and what I need to know is if this problem has been fixed in a later version during the last couple of months and if so I will renew the subscription. Not much point if it hasn’t been fixed.

    I’m using Avada theme (latest) and latest WordPress version and Woocommerce 3.2.6)

    Cheers

  13. Lee January 1, 2018 at 4:12 am #

    Hiya

    Further to the previous comment, searching on Google just in case you haven’t updated the plugin and fixed things, this might solve the issue and save you some work (found it at the bottom of this thread: https://stackoverflow.com/questions/43374133/woocommerce-notice-product-type-was-called-incorrectly-product-properties-shou ) though I’m not sure quite where to locate things so guess I’ll have to search the files and hope for the best but as mentioned if you have fixed the plugin anyway I’ll just renew it 馃檪

    Quote/
    “The product_type property is deprecated. Use get_type() to get internal type.

    So you need to change this:

    $product->product_type;

    to this:

    $product->get_type();
    /unquote

  14. Lee January 1, 2018 at 5:11 am #

    Hello

    My posts seem to have disappeared and I can’t be bothered typing them again. Can you tell me what version the Groups Restrict Categories Plugin is on at the moment. I have version 2.01 but the subscription ran out a couple of months ago. Though I have the updater plugin installed it does not say that there is a new version.

    I want to renew it but there is a problem with it so I need to know if it has been updated and the problem fixed – or it will be fixed (I can’t post this question in the forum because no access and I can’t see anyway to contact you to ask.)

    Thanks

    • antonio January 3, 2018 at 9:24 am #

      Hi Lee,
      Sorry for the delay.
      The last version is the 2.1.0, if this is not your version, please download the last version from the downloads page. If the problem persists, please send me access to antonio[at]itthinx[dot]com indicating this conversation and attaching the debug file and I’ll have a look at your settings.
      Kind Regards,
      Antonio B.

  15. Lee January 3, 2018 at 10:09 am #

    Hi Anonio, thanks for your response!

    I’d initially let the subscription lapse because it’s for a client site and lets just say getting the client paying annually for a plugin etc is a hassle I’m not up to at the moment. ;). As the old plugin was still working (apart from the huge error logs after woocommerce went to v3) I decided to let it ride for a while. However those logs became a pain as I had to delete them everty night (sometimes twice in one day) for fear it would suck up all the resources.

    I decided to bite the bullet yesterday and just renew the subscription – if it was still same version then I could get you to take a look at it and hopefully solve things. Anyway it was 2 versions ahead of what I had and when I overwrote the old one it solved the problem. Yay! No more huge error logs!

    As it has saved me a lot of hassle I won’t bother getting the cost back from the client this time, I’ll prepare myself for that eventuality next time it runs out again. 馃槈

    (Awesome plugin by the way!. )

    Regards
    Lee

  16. Luke February 2, 2018 at 6:39 pm #

    Hello,

    My company has been using the implementation of restriction by category that has been present in the Groups plugin for years. The functionality has now been labeled “legacy”, and we are concerned that the introduction of this add-on will lead to removal of the legacy functionality, which will break several of our clients’ sites. Will support for the legacy system be removed in a future update and, if so, what migration path do we have?

    Thanks,
    Luke

    • antonio February 6, 2018 at 4:47 pm #

      Hi Luke,
      With Groups 2.x a new model of access control is introduced where various post types are restricted by groups instead of capabilities. Here you have a migration guide. But for now we will continue with both models (groups and capacities).
      Kind Regards,
      Antonio B.

Leave a Reply