Query posts with a meta key of post ID whose post no longer exists
-
Hi there,
I’m looking for an efficient way to query posts that has a meta key whose value is a post ID (of a custom post type) which does not exist any more.
For example, there are posts of the book custom post type. And those book posts have a meta key,
_shop_id
, whose value is a post ID of another post type, shop. Now I’d like to select books that belongs to a shop which does not exist anymore.I hope what I said is clear. I guess
WP_Query
arguments do not support such a task, or does it?Thanks for your help!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Query posts with a meta key of post ID whose post no longer exists’ is closed to new replies.