1
vote
1answer
437 views

Using get_posts() with tax_query parameter set isn't working with attachments

I'm working on a project that requires searching for attachments with a given taxonomy-slug pair (in this case, category=javascript). I'm using get_posts() with tax_query set to achieve this, but it ...
0
votes
1answer
2k views

tax_query in get_posts() not working?

I'm trying to print out all the posts within every taxonomy for a custom post type called product (jigoshop products). So i get all of the taxonomies using $cats = get_terms('product_cat');, then i ...
1
vote
1answer
843 views

Problem with get_posts, tax_query and counting the number of posts

I want to count the number of posts that has simoultaneously 3 different taxonomies. THe code i'm using is this: $products = get_posts(array( 'post_type' => 'products', 'posts_per_page' ...