Skip to main content

Questions tagged [tax-query]

0 votes
0 answers
12 views

I have a Woocommerce store, all my prices are incl. tax. Its a b2c/b2b hybrid store. I need the following: Only certain user role (wholesale) AND only outside of NL should have a certain taxclass. The ...
Zer.re's user avatar
  • 1
0 votes
1 answer
88 views

The WordPress website I'm working on is available in two languages using Polylang, en-US and en-PH. I use CPT UI and have a custom taxonomy "subtopic" that is not multilingual. Under "...
Sum's user avatar
  • 11
0 votes
2 answers
669 views

I know how to query all posts in a certain category by slug with WP_Query. What I would like to do is the same with the core/query block markup. I am able to get it working with the category ID, but I'...
JDQ's user avatar
  • 159
1 vote
0 answers
24 views

This query using the same arguments is returning different posts order: sample / test codes: // Query 1 $query_args = [ 'post_type' => 'business', 'showposts' => 8, 'no_found_rows' =&...
FatMiming's user avatar
0 votes
1 answer
136 views

I am trying to get posts that are present in both the taxonomy terms. This is the code that didn't work: $args = array( 'post_type' => 'workshops', 'posts_per_page' => -1, 'fields' =...
user1448031's user avatar
2 votes
1 answer
1k views

I've setup a custom query, I'm using Woocommerce and I am aware that it has it's own functionality, but have been tasked with creating custom filtering with a traditionally paged product/category ...
Bagseye's user avatar
  • 69
0 votes
1 answer
308 views

Working on a category archive, i have a sidebar with custom non hierarchical taxonomies, used as filters (like custom post_tags). In order to list those filters, I use wp_get_object_terms: <?php ...
rafa226's user avatar
  • 121
0 votes
0 answers
353 views

I want to create a post feed that displays the following: ALL posts in the CPT 'custom_post_type_1' Any 'post's in the category 'speakers' So far, I have this filter which displays all posts in '...
srack's user avatar
  • 1
1 vote
1 answer
1k views

I have a wp_query that uses tax_query to which I pass an array of taxonomy term IDs. I'd like to order my results based on the order of that array but can't get it to work and searching has got me ...
shagpun's user avatar
  • 21
0 votes
0 answers
130 views

I am using the following wp_query to pull up a list of post, and I want to exclude a few categories of a custom taxonomy. It works well, however Query Monitor is telling me that the query is slow. I ...
Edegist's user avatar
  • 133
0 votes
0 answers
1k views

Using the following code, I expect $items to not include products with the product category "stones." However, that is not the result. It doesn't seem to be excluding that category at all. ...
the.s.brom's user avatar
1 vote
2 answers
1k views

I'm trying to include more than one term_id(multiple checkboxes filter) on a single category page. I managed to recollect enough to build a tax_query with pre_get_posts, but now it seems, I have two ...
steakoverflow's user avatar
3 votes
1 answer
638 views

I know this kind of question is legion but I have read through all related topics and I can't find a satisfying solution. What I want to achieve is simple: on my taxonomy (author) term archive page I ...
Julien G's user avatar
0 votes
1 answer
448 views

I'm trying to query a customer post type where the results may be within one of several associated terms. The issue however is that only the first term yellow-gold-jewellery is being returned for, and ...
jmcgrory's user avatar
  • 121
0 votes
1 answer
614 views

I want to write a query that looks up taxonomies. One condition is that taxonomyA returns x, and a second condition is that taxonomyB returns empty. I don't know how to query for empty. This is what ...
iwillbeawebdeveloper's user avatar

15 30 50 per page
1
2 3 4 5
19