Custom Taxonomies in WP_Query
I’ve been using the Types plugin for a short while now. I created a custom taxonomy called “Talk Type”, with the slug “talk-type”. The taxonomy is showing up in the database as “talk-type”, but I can’t seem to check it in a WP_Query.
I’ve tried simply:
and I’ve also tried:
'tax_query' => array( array( 'taxonomy' => 'talk-type', 'field' => 'slug', 'term' => 'sunday-talk' ) )
Neither work. The first (using
'taxonomy-name'=>'term-slug') just seems to ignore the taxonomy, and show me all posts from that post type. The second (
tax_query) shows no posts at all.
Can anyone offer some suggestions please?
- The topic ‘Custom Taxonomies in WP_Query’ is closed to new replies.