So I'm building this post query array:
$posts = get_posts(array(
'author' => $publisher_info-ID,
'post_type' => 'post',
'posts_per_page' => 150,
'meta_query' => array(
array(
'taxonomy' => 'type',
'field' => 'slug',
'terms' => array( 'campaign' ),
),
array(
'key' => 'status',
'value' => 'active',
),
),
'orderby' => 'rand'
));
What I'm struggling is how to integrate two meta key comparison?
Let's say I have two meta keys meta_key
A1 and meta_key
A2.
Both have numbers in their meta_value
.
What I want is to incorporate: A1 < A2 in the array.
Any help would be appreciated.
meta_query
contains a taxonomy query that should be in thetax_query
arg, and you're also missing>
here:$publisher_info-ID
...