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
- Nested meta_query with multiple relation keys
- “tax_query” parameter not working with WP_Query
- Multiple relationship for multiple tax_query in WP_Query
- Query posts by custom taxonomy ID
- Does tax_query really beats meta_query in all situations?
- Including all terms in wordpress tax_query
- 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 create a WP_Query to search the Title or Tag?
- Find all product that contain terms with %keywords% in WP_Query
- Get term by custom term meta and taxonomy
- How to add terms to my tax_query based off of the current post
- Query for custom post type objects in a taxonomy and with a meta value
- Query all posts in a given taxonomy
- Related Tags Concept
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- Is it possible to dynamically get queried term AND taxonomy?
- Get pages only with a specific taxonomy
- How do I query a taxonomy term range
- Get list of terms that have posts in another term
- pre_get_posts Remove tax_query Completely
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- Query Multiple Taxominies Across Multiple Post type’s
- Meta Query relation “AND” not working
- Nested tax_query that allows specified categories OR tags, but NOT other categories
- How can I add multiple ‘tax_query’ arrays via a loop?
- Querying two taxonomies
- Fetch posts that match term slug first two letters (wp query)
- WP_Query tax query part of slug
- Searching in title or meta, with a tax query too!
- Why is this query not working? (Standard posts + custom post type)
- Tax query AND/OR meta query [duplicate]
- Custom Taxonomy Not Working When added to WordPress Search
- Exclude posts which have any term in a certain taxonomy from the query
- How to display Related Posts based on number of taxonomy terms matched
- Custom select query for taxonomies that have posts categorized in another taxonomy
- WP_query – Filter by tax_query and meta_query using multiple select
- Tax Query only returns for the first of several terms
- Set both meta_query and tax_query using wp_query->set
- tax_query: Don’t show posts with parent term when they have a corresponding child term applied
- $query->is_main_query() is causing query’s tax_query to be ignored
- How to get custom taxonomy terms based on another taxonomy?
- Loop posts based on permalink term
- tax_query (if the terms are empty)
- tax query shortcode
- How to restrict search on a certain page to only return results against custom taxonomies?
- Function using get_posts() with tax_query not working when called from functions.php
- Running a custom query inside another cpt single and trying to grab a variable
- Grab all Custom Posts by multiple taxonomies and terms
- WP_Query tax_query – Show results if child has parent X
- how to use tax_query to apply both terms or one if one is empty
- Show multiple tax_query from 2 or more post_type in a single code
- Query all posts under one taxonomy? Why is my code not working?
- Mixing custom post type and taxonomy rewrite structures?
- Get Posts Related to Category By category id or slug
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Display just the Post’s parent Category, not child
- Display related CPT with custom taxonomy
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- Tax query get first product with attribute value in pre_get_posts
- Why pagination is not working with tax_query param?
- Query child posts with tax query on parents
- posts_per_page in a tax_query
- Getting Custom Posts with Custom Taxonomy
- Not able to get my custom search result using meta_query and tax_query together?
- Multiple WordPress Sites, Same Database but Filtered Content
- Error get_posts with Custom Taxonomy and OR relation
- How to show post which has the specific taxonomy terms?
- Woocommerce orderby rand with tax_query not random
- Display related posts with same category or same tag return blank
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- How to get multiple Taxonomies not All Taxonomies?
- Custom Query Arguments
- Listing post with this way “domain.com/taxonomy/category
- How to limit posts to 1 from each term with tax_query?
- How to pass >= condition filter to my year custom tax_query
- wp_get_object_terms count on taxonomies within an category archive
- Custom query with custom filtering returning incorrect results
- Having trouble querying multiple custom taxonomies