I would like to create a view that shows only Posts authored by Users with a specific Role (or set of roles).
I have a custom Role "Active Member", for example. The User has that role contingent on their current subscription membership via Memberpress. Only the posts of current subscription holders should be display in the view, and so I would like to filter by Role.
I am able to get it to work very simply, and to display a couple of fields from the Post for each User with that Role. But the view ultimately needs to be ordered and sortable by Custom Post fields, not by attributes of the users. Totally lost! Is there any way to do this? Can I have a robust, searchable, sorted view of a custom post type that is filtered by Role of the User/author? (And if so, how?)
Hello. Thank you for contacting the Toolset support.
If you want a view to display the results sort by custom post field then you will have to create a post type view.
To filter the posts based on specific role, you will have to use the view's hook "wpv_filter_query" where you should first try to find all the users belongs to specific role - for example: