I can get a category id or slug for my custom taxonomy just fine, but I then need to be able to get all the posts as an array for that taxonomy entry. My code is as follows:
$args = array( 'post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => -1 ); $the_query = new WP_Query( $args ); while ( $the_query->have_posts() ) : $the_query->the_post(); endwhile;
When I add 'category_name'=>'my_taxonomy_name' to the args array, it just causes the $the_query to be empty although I know that there is post in there. I have also tried changing it to 'cat'=>22, but this also has the same fault.
Can anyone help?