I can't seem to figure this out.
The following query works:
$xxxx = new WP_Query(array(
'listset' => 'homepage',
'meta_query' => array(
array (
'key' => 'show_home',
'value' => 'true',
'compare' => '='
)
),
'posts_per_page' => 1,
'post_type' => 'lists',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC'
));
The following does not:
$xxxx = new WP_Query(array(
'tax_query' => array(
array (
'taxonomy' => 'listset',
'field' => 'slug',
'terms' => 'homepage'
)
),
'meta_query' => array(
array (
'key' => 'show_home',
'value' => 'true',
'compare' => '='
)
),
'posts_per_page' => 1,
'post_type' => 'lists',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC'
));
Anyone can help me figure out why the second one doesn't work?