Problem: I would like to use Forms to allow Users to submit and edit posts. I would like to group Users by Company, and allow all Users from the same Company to read and edit all posts by all Users from the same Company.
Solution: Unfortunately there isn't a simple option that will allow you to create this type of filter. I think the simplest option is to add a custom field that holds a Company ID in the User profile, and add another custom field that holds the Company ID in each post. When each User submits content, the Company ID from their User profile could be used to set a custom field in the submitted post. Then you could filter a View by Company ID, and that would show each User content from other Users in their own Company.
Another more complex solution is to use a proxy custom post type that represents Users - something like "Employees". Each User is the post author of one Employee post. Then you can use post relationships to relate Employees and Companies. Then you can use Views post relationship filters to show and hide content based on which Company the Employee is related to. We have more information about using a proxy post type available here: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
See the first FAQ for more information about how you can limit each User to only one Employee post.
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 4 years, 11 months ago.
Assisted by: Christian Cox.