Modify entry filter for specific view

By: Enrico Brugnoni | Asked: 06/10/2023
ForumsCategory: General questionsModify entry filter for specific view
Enrico Brugnoni asked 1 year ago

Before asking the question, i will provide some context, as the question itself is very easy.
There are some users who register and compile forms (For the sake of semplicity, i will call them 1, 2, 3 ,4) and then 2 users who can see what they compile on the front end via views (We will call them "see1" and "see2").
"see1", can only see in his view what 1 and 2 have compiled, while "see2" can only see what 3 and 4 have compiled. (this is done via the entry filters in views, or user Id is equal to 3 ecc)

The question and need is, when another user is registering, how do i add assign him to the see1 or see2? i just need to know how to do the following:
Example: user 6 is registered and i want see2 to see his entries, the view of see2 should be updated as such (Attachments).
I just need to know how to add another filter like "OR User ID is equal to 6" in the view without manually modifying it in the back-end.
Thanks a lot

Attachments
1 Answers
Best Answer
Victor Font answered 1 year ago
You could assign the various users to a custom WordPress role and filter the view by role instead of user id. It will all be on auto-pilot if you use the User Registration add-on.
Enrico Brugnoni replied 1 year ago

thank you Victor!
Very good idea indeed!

Enrico Brugnoni replied 1 year ago

thank you Victor!
Very good idea indeed!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right