Skip Navigation

[Resolved] Can I set access to some posts that belong specific category with Toolset Access

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

Problem:

The issue here is that the user wanted to display different templates on a post based on the taxonomy attached.

Solution:

When creating a content template and selecting the post that the template should apply to, you will see the option "set conditions" from there you should be able to use our conditional statements to apply any condition to the content template.

This will allow you to apply the content template to any post based on if a condition is met.

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by dominiqueM-3 2 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2127781

Tell us what you are trying to do?
I'm working on a site which has private contents.

I'm wondering if I can use Toolset Access Control to setup permissions to read posts that belong to some specific categories.
In other words I would like to restrict posts (or custom post type posts) at a taxonomy term level.
For example: members of user role A could read posts with category A but not members of user role B.

Thank you

#2128209

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dominique,

Thank you for getting in touch.

While you may not be able to do this with our Access plugin, you can make use of our Conditional block which allows you to check if a post is attached to a taxonomy as well as the ability to check the user's role and if both are true then you can display the post for that user.

There is also the method where you can assign different content templates based on the taxonomy that is attached to the posts and in there you can use the conditional to check the user's role to ensure they can have access to the post.

In summary there is essentially 2 ways to do this but I would recommend using the last method where you assign different content templates to the posts.

Under the Usage tab where you select the post type, you can set a conditional for the posts that should get this template assigned, see Screenshot.

Please let me know if this helps or if further clarification is needed.

Thanks,
Shane

#2128967

Hi Shane,

Thank you for your detailed explanations.
But I can't see the screenshot you are talking about.

Thank you

#2129001

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2021-07-28 at 2.39.46 PM.png

Hi Dominique,

My Apologies, i've re-attached the screenshot to the post.

The screenshot illustrates where the "set conditions" button is to apply the conditional statement to the content template.

Thanks,
Shane

#2129017

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.