Looking at the WP_Query documentation on tax_queries we can see it accepts a nested array as a parameter. Compare that to the provided code:
'tax_query' => array(
'taxonomy' => 'news_category',
'field' => 'term_id',
'terms' => 82,
),
Should look like:
'tax_query' => [
[
'taxonomy' => 'news_category',
'field' => 'term_id',
'terms' => 82,
]
],
Related Posts:
- WordPress tax query use operator LIKE
- tax_query will produce nothing
- Multiple, nested tax_query relation
- 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
- simple tax_query intersection
- How to set `tax_query` with `query->set()`
- Escaping WP_Query tax_query when term has special character(s)
- Tax_query terms ID’s using variable
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Order posts by (hierarchical custom) taxonomy terms and term children
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to combine tax_query and date_query in WordPress
- Specify number of posts in my ‘tax_query’
- Problem with get_posts, tax_query and counting the number of posts
- 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
- List taxonomy / category count showing list published posts only
- tax_query shows no results if nothing is selected
- get complex results set according to category structure
- WP_Query tax_query on ACF post_object
- WP_Query tax_query problem
- How to output content based on same custom taxonomy?
- Change default ordering of taxonomy terms – pre_get_terms
- How do I sort posts by custom taxonomy?
- WP_Query, tax_query and term_meta: How to?
- Empty tax_query array returns an empty array
- How can i simulate “taxonomy__in” in query?
- How to add autocomplete to custom taxonomy for CPT
- pre_get_posts: using tax_query only for certain post type
- Query custom post type by category slug
- ?cat=-1 Indexed Versions Of Homepage
- Populate tax_query terms parameter with post term
- Tax query not producing any results
- Fastest way of counting posts of a custom post type in a specific taxonomy term?
- How to Filter custom post type by taxonomy?
- Is it a good idea to improve meta query performance by adding tax query?
- WP_Query | Tax_Query Relation | Unable to use ‘OR’ as it then allows all products, help me finish my query?
- Using meta_query and tax_query at the same time
- Retrieve Custom Taxonomies according to posts selected
- How do I display the grand child items of a taxonomy term?
- How can I hide uncategorized products from search results?
- Hiding taxonomies with no children WP_Query & tax_query
- tax_query not working in template
- Order or Orderby in tax_query (How to define order of terms in WP_Query)
- tax_query not working
- WP_Query parameter conflict
- How to do a particular wp_query taxonomy search
- 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
- Is it possible to query posts with tax queries after multisite switch_to_blog() function?
- Very complex post query
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- Get category if used in a custom post type
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Secondary WP_Query being overriden in archive page
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- Custom tax_query filter not working for Woocommerce product categories
- tax query between operator like
- Tax_Query using WP_Query not working
- “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
- Any quicker alternative for WP_Query “NOT IN”
- Tax Query on product_cat using NOT IN as operator does not exclude that category
- List only parent attributes on woocommerce admin atrributes page
- PHP Warning: Attempt to read property “slug” on bool in tax query
- Multiple dynamic Tax Query – pass taxonomy argument from array
- custom post type and a “sticky” position taxonomy
- wp_query with meta_query and tax_query
- Tax-query on taxonomy doesn´t work
- list all post who have mutual taxonomy as current taxonomy!
- Cannot get to work tax_query array for terms
- How can I get the last 5 element of this tax query?
- Order WordPress Query by Custom Field While Still Using Tax_query Argument
- WP Query tax_query not returning posts
- First ID won’t be excluded in wp_dropdown_pages with an $arg from tax_query
- Parse error: syntax error, unexpected ”tax_query” in wordpress
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- WordPress Multiple Taxonomy Query
- How can I get all the posts that are related with a specific taxonomy term?
- How to combine nested tax_query logic with other nested query logic?
- tax_query not working for taxonomy slug
- Query breaking with ‘posts_per_page’ => -1
- Custom query for tag and custom tag from 2 post type
- Multiple terms not working on taxonomy
- List posts of terms but exclude one term
- tax_query showing no results
- Match two taxonomies to display a specific content
- Cannot query custom post type taxonomy from theme options array
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Custom query for certain post type OR another post type with a certain category
- WP Query Conditionally query meta and taxonomy
- Complex Taxonomy scheme
- Operator ‘AND’ in the get_posts() function’s tax_query terms not working