Filtering by user role

If you want to display only entries created by users with a certain role, you can do that with Advanced Filters. Note: This functionality requires GravityView 2.0.14; filtering by role may not work properly in earlier versions.

When editing a View, scroll to View Settings and click "Filter & Sort"

The Filter & Sort tab in GravityView, when editing a View, under View Settings

Click the "Add Condition" button

Add Condition button in Filter & Sort View Setting

Then choose "Created By User Role" from the first dropdown

Select 'Created By User Role' from the form field dropdown

Choose the role you wish to display entries from

A drop-down showing all the roles for the site (Administrator, Subscriber, etc)

If you choose "Any Role of Current User", the currently logged-in user's roles will be used

Filter configured with 'Any Role of Current User' selected
All of the user's roles will be used to filter the entries: If an user is logged-in and the user has the roles of "Subscriber" as well as "Customer", then the filter will show entries from users who are Subscribers OR Customers. If the current user is an Editor as well as an Administrator, then entries will be shown from all Editors and Administrators.

You can also use "is not"!

You can choose to exclude entries created by users with certain roles by selecting the "is not" comparison from the filter dropdown.

To show all entries that were not created by site administrators, you could add this configuration: "Created By User Role" "is not" "Administrator", as shown below.

Filter configured to hide all entries created by administrators by setting the filter value to 'Created By User Role' 'is not' 'Administrator'
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.