I have the following arguments for a WP_Query:
$args = array(
'post_type' => array( 'cpt-1', 'cpt-2' ),
'post_status' => 'publish',
'posts_per_page' => 9,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'key-1',
'compare' => 'NOT EXISTS'
),
array(
'key' => 'key-1',
'value' => 1,
'compare' => '!='
)
),
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'ctax-1',
'field' => 'slug',
'terms' => 'term-1',
'operator' => 'NOT IN'
),
array(
'taxonomy' => 'ctax-2',
'field' => 'slug',
'terms' => 'term-2',
'operator' => 'NOT IN'
)
),
);
Now I would like to add to the loop the custom post type cpt-3
but only if its posts has the custom field value of the custom meta key-2
set to 1.
Is it possible?