I'm using a plugin (IssueM) which gives the "articles" post-type a custom taxonomy called "Issues".
I'm trying to return all "articles" which have the taxonomy issue-one
set (which is the slug name). But I cannot get it to return anything:
$the_query = new WP_Query(
array(
'post_type' => 'article',
'posts_per_page' => -1,
'taxonomy' => 'issue',
'term' => 'issue-one'
)
);
I'm not sure whether the taxonomy
field needs to be issue
or issues
so I've tried both but neither work. I have tried the slug name for the term e.g issue-one
and also the written name e.g Issue One
.
I have been instructed elsewhere that I need to use a taxonomy query
instead, here is what I have so far:
'tax_query' => array(
array(
'taxonomy' => 'Issues',
'field' => 'slug',
'terms' => 'issue-one'
),
),
Attempted the following, no luck:
$args = array(
'post_type' => 'article',
'tax_query' => array(
array(
'taxonomy' => 'Issues',
'field' => 'issuem_issue',
'terms' => 'issue-one'
),
),
'posts_per_page' => -1
);