[Resolved] Restrict by category (and menus)

This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Restrict access for posts/pages and for Taxonomies.

Solution:
You need to use Post Groups feature of Access plugin. Create a new Post Group (name it for example: Only for Admins) >> setup its permission settings >> then assign that new Post Group (instead of Category) to the Pages that you want to restrict for specific user role.

Relevant Documentation:
Here is doc which explains this process:
https://wp-types.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-read-access-specific-pages-posts-members/

Hide some pages from Menu navigation based on user roles, use the Nav Menu Roles plugin, as explain in this step in our doc:
https://wp-types.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-read-access-specific-pages-posts-members/#nav

Tagged: 

This topic contains 9 replies, has 2 voices, and was last updated by  Noman 1 week ago. The support staff assigned to this topic is Noman.

Viewing 10 posts - 1 through 10 (of 10 total)
Author
Posts
#569523

It seems there is no simple way to restrict content by taxonomy.

After searching the forums and support, it seems that users would want this and it would be a good improvement.

Are they any plans for this?
It is possible with other access plugins but obviously, this is best avoided as there is already quite a lot of plugins to toolset.

Also restriction for menus would be great. Also have to use other content restriction plugins for this.

Thanks.
Rob

#569537

Noman
Forum moderator

Supporter languages: English (English )

Supporter Timezone: Asia/Karachi (GMT+05:00)

Hi Rob,

Thank you for contacting Toolset support. Can you please provide more details that what you want to achieve?

1. Can you please provide step by step details that how you want to restrict content by taxonomy and menu (preferably with an example, like User 1 can not access and User 2 can access, or completely hide taxonomy from the front-end)

2. What you expected to see on the front page?
3. What you actually see? (preferably with front-end screenshot and Link)

Looking forward to help you.
Thank you

#569559

Thanks for your quick reply Norman,

I would like:

Any content (posts,CPTs) with Category (or tag) 'Admin', to be not visible to

Subscriber Role (or User X)
only
Administrator Role (or User Y)

And this restriction would apply anywhere on the site.
Ideally the taxonomy itself would not be visible to Subscriber Role (or User X) in a list of the site's categories but that would be ideal. Even is they saw the Category but was presented by a restricted content message on clicking then that would be acceptable.

Hope that makes sense.
Thank you
Rob

#569561

https://aamplugin.com/help/how-to-manage-wordpress-post-and-category-access

this is an example from AAM plugin (pro version)

#569575

Noman
Forum moderator

Supporter languages: English (English )

Supporter Timezone: Asia/Karachi (GMT+05:00)

The way restrictions and permissions work in Access for posts/pages and for Taxonomies, this wont be doable the way you are trying to use it.

Instead of Category, you can need to use Post Groups feature of Access plugin. Create a new Post Group (name it for example: Only for Admins) >> setup its permission settings >> then assign that new Post Group (instead of Category) to the Pages that you want to restrict for Subscribers.

Here is doc which explains this process:
https://wp-types.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-read-access-specific-pages-posts-members/

If you want to hide some pages from your navigation based on user roles, use the Nav Menu Roles plugin, as explain in this step in our doc:
https://wp-types.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-read-access-specific-pages-posts-members/#nav

Otherwise if you still wants to control it by a Category, this needs to be done using custom development and coding. For this you need to contact Toolset recommended service providers to further discuss the custom approach. We have some recommended list of service providers here if you would like to take a look: https://wp-types.com/consultant/

Thanks

#569686

Thanks again Norman

The Post Groups work fine for what they are. I wonder though...

...if it would be a short leap to restrict by category if we are able to:

1) select multiple content items (posts/pages/cpts), filtered by category and put them quickly into Post Group

2) auto-add any new items from a CPT into a post group.

It would be good if it was possible in Toolset. I guess 1) can be done by exporting items - using external stuff then reimporting.
or by using a plugin like Admin Columns (pro) or Admin Management Xtended. But once again, trying to reduce plugins.

2) would that require custom-coding?

Best
Rob

#569688

Sorry this
2) auto-add any new items from a CPT into a post group.

should say any items from a 'category.' not CPT.
However the logic could be any taxonomy or type really. I don't know if access can auto-add content to post-groups on creation or editing them. Looks like it's controlled only from the 'add to post group' dropdown while editing the page.

#569777

Noman
Forum moderator

Supporter languages: English (English )

Supporter Timezone: Asia/Karachi (GMT+05:00)

No we don't have any automatic way to add new posts into a Post Group. And I see a problem in it, if we add the posts automatically then all new posts added into the CPT will be assigned to one same group.

Whereas if we say that only those news Posts >> assigned to a specific category >> will be automatically added to a specific Post Group. I think this is what would be more realistic usable way. But in this case as well, currently possibilities of Access does not have this feature.

If you would like me to submit this as a feature request, please let me know and I will submit it to our team for consideration as a feature.

Thank you

#569939

Thanks again for your replies.

I'll tick it as resolved but the really the Feature Request would simply be:

** Access - Restrict by taxonomy. (User X can't get access/edit/visibility to Category Y or Tag Y) **

The idea of bulk and auto-adding a category / tag to a Post Group could be a workaround. Although the users will still be able to see the 'hidden' taxonomies. So it would be good if they couldn't. However it would be acceptable.

Also there are lots of other functionalities built into WP and other plugins that use taxonomies, which would not be available to Post Groups. as far I can tell.

I like the idea of Post Groups - but more of the above.

Best Wishes
Rob

#570109

Noman
Forum moderator

Supporter languages: English (English )

Supporter Timezone: Asia/Karachi (GMT+05:00)

Hey Rob,

Thank you for providing more details, I have submitted this as a feature request to our development team for further consideration.

Thank you for your cooperation and understanding.

Viewing 10 posts - 1 through 10 (of 10 total)

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

Known issues and their solutions

We document known issues and their solutions in Toolset erratas. Save time by checking there first and seeing if what you are facing is a known issue. This list is kept short. We do our best to resolve all known issues with every release of Toolset plugins.

Support Policy

Toolset staff will help you use the Toolset plugins correctly, provide any information you need, help troubleshoot problems and advice on best-practices.

Please make sure to issue only one topic per each support ticket.

For more information, read our full Customer Support Policy.

Need custom programming work for your site? Check out our certified partners.