Skip Navigation

[Gelöst] Views Query Filter users with Role set by View shortcode attribute?

This support ticket is created vor 7 Jahre, 7 Monate. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by Kris Haamer vor 7 Jahre, 7 Monate.

Assigned support staff: Shane.


I am trying to filter users with the Role set by View shortcode attribute. How would I achieve that with views? The query filter only allows me to set the user filter Criteria to ID or username.




Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kris,

If you are talking about filtering the data based on the user's role then I'm not sure that this can be achieved. The reason for this is that the filters are done based on the attributes of the Post Object itself (see link)

Only the attributes of the Post Object can be used in a filter.

The reason for only having the username and id only is that they can be used as the post_author attribute to run a filter.

Notice in the Post object we do not see an attribute for role.

If I am not understanding the question, please let me know and we can go from there.



Yes, that's it. What I'm doing is showing a list of members on different pages based on their role in the company. With the current setup I needed to create a bunch of views that are exactly the same with the only difference of manually selecting the role for each view. It works but would make more sense to add more complex filter queries in the future and I could do this with only 1 view. #FeatureRequest