Hi, I have a view that lists all posts from all users of all roles.
I would like to prevent posts from administrators to be queried, unless the logged in user have administrator role.
I'm thinking of adding a conditional in the loop editor, but that just going to hide them from the list which will make the number of displayed posts per page different across pages.
Hello. Thank you for contacting the Toolset support.
So - you want to display only posts of currently logged-in user? OR You have a view that list all post from all author and you just want to exclude the "Administrator" posts?
It's the second, exclude administrator posts if the logged-in user does not have an administrator role.
Here's an illustration of the posts list when an administrator is logged in
[Post title 1] by administrator_1
[Post title 2] by author_1
[Post title 3] by administrator_2
[Post title 4] by author_2
...
And here's an illustration when a user with role other than administrator is logged in
[Post title 2] by author_1
[Post title 4] by author_2
[Post title 5] by author_3
[Post title 6] by author_4
...