I am trying to add a delisting feature to my WordPress network. Posts which are delisted would not appear in post lists, but would still be visible if accessed directly.
I've written a plugin that helps editors delist entries with custom meta values on authors and posts. So there are two meta values that I need to check before displaying each post in public listings: the
delist-post post meta value and the
delist-author user meta value.
I was hoping to register a
pre_get_posts filter that limits the return of
get_posts() by setting the query's
meta_query property. Is it possible to check a user meta value with a posts
meta_query? If not, can you think of a better way to do this without adding conditional statements in theme files (i.e. not
if (!get_post_meta(...) && !get_user_meta(...)) in the_loop)?