I have a custom post type that I have created with the Types plugin. Within this post type are about 25 fields that I created via Toolset.
I have three user roles, "Customer," "Manager," and "Owner".
One of my fields is "Show to Customer", a simple true/false field.
Here's what I need to accomplish:
I need a single page that displays a view that's dependent on your user role.
The "Customer" role can only see the posts where "Show to Customer" is true. "Customer" role sees only 5 of the 25 fields.
The "Manager" role sees all the posts but only 15 of the 25 fields.
The "Owner" role sees everything -- all posts, all 25 fields.
Can I use the Views plugin in combination with the Access plugin like this?
I suggest to do it like this:
1. Create a View and query the post type
2. Create a View and add a Conditional HTML to check upon your "Show to Customer" field, and the current user role.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views
3. Insert this View to any page to see the output as the determined roles.
Or:
1. Create 2 Views and return each exactly the posts you want (add Query Filters that check upon the "Show to Customer" field)
2. Insert the Views to a page and wrap them in Toolset Access ShortCodes that check upon the user role:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
3. Visit the page and see the output as the determined roles.
Let me know if you have further questions.