The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.
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.
This support ticket is created vor 7 Jahren, 2 Monaten. There's a good chance that you are reading advice that it now obsolete.
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.
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.
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)
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.
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.
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://toolset.com/consultant/
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.
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.
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.
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.