I’m trying to query_post custom posts. It works very good with custom taxonomy, but not with default “category” taxonomy. I tried using “category_name” and “tax_query”, but it doesn’t work for me.
My code is:
$c_args = array(
'post_type' => 'product',
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'furniture'
)
)
);
// The Query
wp_reset_postdata();
query_posts( $c_args );
I get no results.
As I said – it works with custom taxonomy, but I need to use “Custom Permalinks” plugin, which doesn’t work with custom taxonomy.
Any help appreciated.
Use WP_Query instead of query_posts().