I'm working with a custom post type and trying to get a query working that includes 2 genres (a custom taxonomy).
I have this, which works for a single genre (I don't want to display the widget currently being viewed in the list, the 'post__not_in' takes care of that).
$myposts = new WP_Query(
array(
'post_type' => 'widgets',
'post__not_in' => array($wp_query->post->ID),
'genre' => 'styleA'
)
);
But I'm having trouble when I try to make a list that includes 2 genres.
I've tried various versions of this:
$myposts = new WP_Query(
array(
'post_type' => 'widgets',
'post__not_in' => array($wp_query->post->ID),
'genre' => array('styleB', 'styleC')
)
);
Everything I've read in the Codex seems to use a syntax like this, anyone know where I'm going wrong?
Much appreciated.
genre? – Wyck Apr 19 '12 at 6:44