I have a number of user roles that I have created using the Ultimate Member plugin. I have set up a number of custom post types using WP Types (called profiles, scenarios and places) and set the UM Content Restriction option on some of these posts to only be visible for certain user roles.
This is working correctly and as expected on archive pages (built with archives section of Toolset), using the Hide from queries UM setting on the posts.
However, I would like to use the UM Content Restriction option within a custom view on the single-profile page that shows Scenarios Profiles Intermediary Posts.
If this can't be done using the views wizard builder I am happy to use php and a custom template instead, just would appreciate a little guidance in where to start with this kind of query.
So, in summary, I have:
3 CPTs (Profiles, Scenarios, Places)
Profiles and Scenarios are linked in a many to many relationship
I have an Ultimate Member user role restriction set on the scenario posts
On a single-profile page I have a view that lists all the Scenarios Profiles Intermediary Posts - but I only want this section to show the scenarios that are set to be visible for the currently logged in user's role.
I hope all of that makes sense and that there is a super easy solution to achieve what I'm after! 🙂
Hello. Thank you for contacting the Toolset support.
Well - there are couple of options you should check which will work best for you.
Option 1:
1) Create a view that lists users of role
2) child view list posts of custom post types, filter with:
Select posts with the author set by the parent View.