Globally filter custom post types by current user roles
-
First off, thanks for the excellent plugin.
Sorry if this question is already addressed somewhere. Searching forums isn’t giving me what I’m after.
We have a custom post type (CPT) that we’re using and assigning roles to each post using that CPT. Now I’d like to globally filter queries used in various templates to return only posts that the current user should see. In this way, I hope things like pagination and other filters will work as expected. I was just looking at trying posts_where to directly alter the query in my site’s main php, but wonder whether there’s a simpler solution that doesn’t require altering raw SQL.
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.