As jdm2112 and SallyCJ said in the comments, the query lacks of 'field' => 'slug'
. So:
'tax_query' => [
'relation' => 'AND',
[
'taxonomy' => 'link-category',
'terms' => $link,
'field' => 'slug'
],
[
'taxonomy' => 'despacho',
'terms' => $despacho,
'field' => 'slug'
],
],
Related Posts:
- WordPress tax query use operator LIKE
- tax_query will produce nothing
- Multiple, nested tax_query relation
- How to Get All Taxonomies AND All Terms For Each Taxonomy With Post Count Zero
- Can’t make a tax_query across different post types
- How to write a Tax Query that matches all terms in an array?
- using multiple terms in tax_query
- in_category() and tax_query with custom post type
- OR for a single taxonomy in a tax_query
- Retrieve Custom Taxonomies according to posts selected
- How do I display the grand child items of a taxonomy term?
- How to set `tax_query` with `query->set()`
- Secondary WP_Query being overriden in archive page
- Show posts from two specific category in WP_Query
- tax_query will produce nothing
- list all post who have mutual taxonomy as current taxonomy!
- Custom taxonomy and query multi conditions
- Complex Taxonomy scheme
- Tax query: exclude posts if ONLY a certain term is applicable
- Nested meta_query with multiple relation keys
- “tax_query” parameter not working with WP_Query
- Multiple relationship for multiple tax_query in WP_Query
- How to add images to taxonomies?
- WordPress tax_query “and” operator not functioning as desired
- Efficient Taxonomy Intersection
- tax_query in get_posts() not working?
- Query posts by custom taxonomy ID
- Custom Taxonomy and Tax_Query
- Conditional arguments for WP_Query and tax_query depending on if $somevar has a value
- When tax_query used, results disappear (0 =1 produced)
- Using multiple taxonomies to sort Custom Posts
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- Escaping WP_Query tax_query when term has special character(s)
- Does tax_query really beats meta_query in all situations?
- pre_get_posts with tax_query causes empty result
- Filter posts by multiple custom taxonomy terms using AND operator in REST API v2 (WordPress)
- Taxonomy menu with post count and multiple parents
- Including all terms in wordpress tax_query
- Tax_query terms ID’s using variable
- wp_get_object_terms() to get a list of all the terms attached to all the posts in the current query
- The Operator “NOT IN” Does Not Work In tax_query
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Why is my WP_Query not working when tax_query terms are an array?
- get_terms with posts that have a different taxonomy with term x
- template_include for search.php makes WordPress think its on the home page
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- Hidden woocommerce products still showing up in search results [closed]
- How to choose which template to be used for multiple taxonomy query?
- How to build a multi-taxonomy, multi-term query based on user input
- Counting number of posts with Category B in Category A
- query multiple taxonomy and show post count
- SQL Statement generated by WP_Query not producing expected results
- search query within custom taxonomy term, post title and meta field
- How to create a WP_Query to search the Title or Tag?
- Order posts by (hierarchical custom) taxonomy terms and term children
- if wp_query taxonomy term have posts
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- Group Custom post type in a page by its taxomony tag
- Tax_query not working on multisite
- Query set using tax_query with relation ‘OR’ modifies category object?
- Terms with more than one occurrence have current-menu-item class in menu
- tax_query not working on main query
- Taxonomy posts on Archive page
- How do I search WordPress by different fields without a plugin?
- How to combine tax_query and date_query in WordPress
- Add_query_arg + two times the same argument?
- Specify number of posts in my ‘tax_query’
- Problem with get_posts, tax_query and counting the number of posts
- Combine multiple custom user taxonomy in single url
- How to build a achieve page for a custom CPT with multiple taxonomy button filter
- Combine tax_query and meta_query in WP_Query
- Count number of posts which exist in 2 taxonomies?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- How to extend tag and category “Related Posts” query to custom post_type if the first 2 terms have no posts
- Using tax_query reverses my post_type argument in a custom WP_Query
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- Ordering Posts with Custom Taxonomy Terms Array
- Find all product that contain terms with %keywords% in WP_Query
- List taxonomy / category count showing list published posts only
- Get term by custom term meta and taxonomy
- tax_query: What to pass when I want to have all terms?
- why do drafts return as part of wp_query?
- tax_query shows no results if nothing is selected
- WP_Tax_Query with post_tag not working
- get complex results set according to category structure
- WP_Query tax_query on ACF post_object
- Dynamically tax_query terms
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- WP_Query tax_query problem
- How to add terms to my tax_query based off of the current post
- Query 1 taxonomy term, exclude another
- Query for custom post type objects in a taxonomy and with a meta value
- How to output content based on same custom taxonomy?
- Query all posts in a given taxonomy
- Include CPT values in another CPT?
- “NOT ONLY IN” taxonomy query operator?
- Change default ordering of taxonomy terms – pre_get_terms
- Woocommerce change tax rate programmaticly
- Display related products with custom output