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
- How to add images to taxonomies?
- WordPress tax_query “and” operator not functioning as desired
- Custom Taxonomy and Tax_Query
- Using multiple taxonomies to sort Custom Posts
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- 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
- query multiple taxonomy and show post count
- search query within custom taxonomy term, post title and meta field
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- 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
- How do I search WordPress by different fields without a plugin?
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- why do drafts return as part of wp_query?
- “NOT ONLY IN” taxonomy query operator?
- Woocommerce change tax rate programmaticly
- WP_Query with tax_query, order by most ‘matches’
- get_terms() for custom taxonomy related to another taxonomy
- Use both meta query and tax query
- How to speed up a wordpress function with multiple loops?
- Formulate a url to show posts with both taxonomy terms
- Custom taxonomy query not working with switch_to_blog
- tax_query: Order by slug?
- Creating a multi-taxonomy query, excluding the newest (read: highest ID) taxonomy term
- tax_query operator woes
- ‘wp’ action hook not firing in admin and login?
- Taxonomy archive showing no results
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- Taxonomies on custom taxonomies
- Tax query in pre_get_posts not working
- Custom Widget WP_Query problem
- Custom Post Type Loop with Query Var
- Full Custom Post Type List Organised by two Taxonomies
- Filter custom posts by multiple taxonomies
- Combining categories (Query posts with multiple taxonomy terms)
- Modify users.php query with multiple taxonomies
- Query most popular terms by taxonomy over 2 week period
- Set tax_query conditionally with new WP_Query
- Query with meta_query and tax_query together not working properly
- Order or Orderby in tax_query (How to define order of terms in WP_Query)
- tax_query not working
- Finding the category id’s on category intersection pages
- Override tax_query with pre_get_posts to include other term_ids on a single category
- Tax query with multiple terms in pre_get_posts
- Very complex post query
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Tax_Query using WP_Query not working
- best way to use custom taxonomy, post type and meta in a job system
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- Custom Query: Multiple CPTs and a taxonomy filter
- How to get related taxonomies based on a category with mysql query?
- List only parent attributes on woocommerce admin atrributes page
- How do I compare the value of two taxonomies in a wp_query
- Custom taxonomy: on the taxonomy term page show other taxonomy terms
- PHP Warning: Attempt to read property “slug” on bool in tax query
- ACF multi taxonomy on filterable gallery
- Custom Taxonomies Archive Page 404
- Tax-query on taxonomy doesn´t work
- Query Multiple Taxonomies and Multiple Terms with Different Operators
- Custom search for a custom post type in WordPress
- WordPress tax_query ignoring relation OR
- First ID won’t be excluded in wp_dropdown_pages with an $arg from tax_query
- No results found for second level category
- display all posts from category with and without terms in chronological order
- tax_query not working for taxonomy slug
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- pre_get_posts main_query not displaying after applying tax_query filters
- tax_query showing no results
- How to use tax_query other than by slug or id or solve custom taxonomy tags conflicts with pre-existing tags?
- Tax query array terms display out of order
- Post Filter clearing on pagination $_post
- Advanced AND tax_query in sidebar with 2 taxonomies
- How to update WordPress custom SQL Select query for custom taxonomies so that syntax is correct?
- Generate multiple tag query URLs
- Using tax_query to get single post per category
- WordPress Two Level Filters on Getting Custom Taxonomy Terms