Hello, is it possible to have a view displaying post types/custom fields that are guided by a taxonomy term related to the member retrieving the information in my membership site? (it would be similar when I assign a parameter for the logged in user, but only those related to that specific taxonomy)
Exemple: a sweater (a taxonomy term applied to the seller) salesperson wants to access only the outlets (outlet only connected to sweater taxonomy term) that are selling sweater and not those selling toys.
in a multi state organization, a manager of a region (in an organization with many regions A, B, C...) only accessing the department in region A, because the manager is an A manager, and does not have access to view
Hello,
Wordpress user does not support custom taxonomy, so you will need consider other workaround, use the example "multi state organization" you mentioned above:
1) Create a custom user role "manager"
2) Create two custom post type:
a) post type "manager-cpt"
- Add "manager-cpt" posts,
- Each "manager-cpt" post's author is one "manager" user, one "manager" user can have only one "manager-cpt" post
b) custom post type "department"
3) Create a taxonomy "regions", register it to both above post types: "manager-cpt" and "department"
When "manager" user log into your website, you can redirect him to a wordpress page, in this page display below nested view:
1) Parent post view:
- Query "manager-cpt" posts
- Filter by post's author is current logged in user
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/#post-author-is-the-same-as-the-logged-in-user
- in view's loop, display below child view
2) Child post view
- Query "department" posts
- Filter by:
Select posts with taxonomy:
"regions" the same as the current post in the loop
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
- in view's loop, display "department" post information
So each manager can only see the "department" posts guided by a taxonomy "regions" term
For your reference.
My issue is resolved now. Thank you!