WP_Query ignores my tax_query
First of all, I apologize for my poor english.
I’m trying to retrive the posts (of post-type “liens”) that have the term “formation” of the “tax_liens_pages” taxonomy, but it appears that my tax_query is just ignored.
When I print out the result of my query, I get all the posts of post-type “liens”.
I’m struggling to find what’s wrong, but I didn’t succeed so far.
I’m 100% sure that my taxonomy and my custom post-type are OK (checked the database)
Here is my query :
$liens_args = array( 'post_type' => 'liens', 'tax-query' => array( array( 'taxonomy' => 'tax_liens_pages', 'field' => 'slug', 'terms' => 'formation' ) ) ); // request $liens = new WP_Query( $liens_args );
Can you think of something ?
- The topic ‘WP_Query ignores my tax_query’ is closed to new replies.