fetch custom post if meta key exist
You were on the right track: use a meta_query in your query. There are plenty of examples in the codex, how you implement it depends on what fields you’re using, but that’s the way to go. An example with multiple fields queried: $args = array( ‘post_type’ => ‘product’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( … Read more