User in multiple groups can’t see posts with multiple categories

Posted in

Hi, we have users in multiple groups, e.g. ‘town a’, ‘town b’, ‘town c’, etc.
We then have post categories which are restricted to members of the assigned groups.
However, if a user is in group: ‘town a’, and I add add post with categories ‘town a’ AND ‘town b’, the user cannot view the post. Can you please advise.

3 Responses to User in multiple groups can’t see posts with multiple categories

  1. George February 11, 2023 at 12:43 am #

    Hi Tracy,

    In this case you don’t need to modify the code but instead alter the way you restrict your content.
    If an article needs to be accessible from all three groups members, then you can add another group let’s say towns and restrict it. Afterwards, each member of these three groups would also become member to towns group.
    As a result, you will still be able to restrict content to each of these groups but also allow them to access specific content through their common group.

    The group management and new group members can be added through your Dashboard under Users. You can select users in bulk and also add/remove them to/from groups also in bulk.
    Reference: https://docs.itthinx.com/document/groups/memberships/

    Kind regards,
    George

  2. Tracy Elford February 10, 2023 at 4:20 pm #

    Thanks for the quick response! Is there a way to customise the code to allow for the following:

    An article posted to groups ‘town a’, ‘town b’, ‘town c’

    A user who is only in group ‘town a’ still able to see the article when accessing the ‘town a’ category page?

    Thanks

  3. George February 9, 2023 at 10:40 am #

    Hi Tracy,

    Welcome back to our support forum.

    That’s the normal process of restrictions applied with groups. When a post or taxonomy is restricted to more than one groups, then a user has access if he/she is a member of all the groups used for that restriction.

    From your description I’m assuming that you would expect it to grant access to any of the members of each group, but Groups plugins works the other way round, a user must be a member of each one of the groups used for that restriction. If you prefer, at least one group is needed to restrict access to a post or taxonomy.

    Kind regards,
    George

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