Your tax query should be an array of arrays.
Important Note: tax_query takes an array of tax query arguments arrays
(it takes an array of arrays). This construct allows you to query
multiple taxonomies by using the relation parameter in the first
(outer) array to describe the boolean relationship between the
taxonomy arrays.https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
'tax_query' => array(
// second array
array(
'taxonomy' => 'event-categories',
'field' => 'slug',
'terms' => $termst
)
// end second array
),
Second, the “key” is terms
not term
as you have it.
Related Posts:
- Remove Custom Taxonomy Metabox from Custom Post Type Screen
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Get Custom Taxonomy ID within loop
- Custom Post Types not showing on Custom Taxonomy archive page
- custom post type or taxonomy
- Remove Trash / Delete option for Custom Post Type / Taxonomy
- How to filter custom post types by custom category taxonomy
- Highlight menu item when on a custom post type?
- Changing the priority of a custom taxonomy’s metabox
- How to setup a Custom Taxonomy Term template
- Admin to user notices – best practices?
- Custom taxonomy & post slug permalink
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Custom Taxonomy List links being re-written
- front end radio custom taxonomy with custom post type
- Child and grandchild taxonomy listings – 404
- Limit taxonomy results to a single cpt
- Bulk 301 redirect for custom post type
- Associate Taxonomies Across Post Types
- ‘category__and’ for custom taxonomy?
- Custom post query by taxonomy
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- How can I show recent posts from same taxonomy as the post currently being viewed?
- Relationship between two taxonomies and a custom post type [closed]
- Sharing a custom taxonomy with Multiple custom post types
- next_post_link on custom taxonomy
- Show Two custom Post type and their posts on category page
- Group custom posts by custom taxonomy names
- Change Permalink Structure for Tag.php template
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Get post from custom post type order by two taxonomies
- How to convert custom post type based list to a dropdown list?
- Wrong request query on cpt and tax
- Custom Taxonomy Archives on Custom Post type Page [duplicate]
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- How to Filter custom post type by taxonomy?
- How can I make the slug of the taxonomy also the slug of the custom post
- Listing posts under primary and secondary taxonomies
- How to list custom taxonomies in the back end
- How do I display the grand child items of a taxonomy term?
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Top Level pages in wordpress giving 404, but child pages working fine
- Search by tag name and category
- Listing custom terms in custom post meta
- Query posts with double taxonomy
- get_the_title() is returning results from previous loop
- How do I display a list showing custom post types nested within a taxonomy?
- Display posts with tag for custom post type only
- Creating two loops based on different logic
- get_category_link() for custom post type does not include custom slug rewrite?
- How to show all taxonomies within custom post type loop
- Showing taxonomy terms on custom post type
- Custom Search | check multiple meta_value for search value
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- How to list custom post types on a custom post type page?
- How to create a template to show child terms of a MAIN taxonomy
- Get Terms from Custom Taxonomy and Current Post
- Check when the post type changes, and display content
- Loop and add Specific Categories and Products Images
- custom post archive URL is wrong
- custom post type or taxonomy, which approach is better?
- Custom Post Type with Different Sets of Post Content?
- Add a class to a div if custom post type has specific terms?
- Custom post type paging return home page
- Basic CPT Question About Categories
- In child theme, add CPT to custom taxonomy registered in parent theme
- Custom taxonomies not displaying in some custom posts
- Custom taxonomy returns 404 even with saving permalinks
- Static Front Page not working for custom theme
- WP_Query to display number of custom post type filtered (order by) taxonomy
- Custom post type shortcode with taxonomy attribute not working and no errors
- Live search by custom tag
- Set a Default CPT taxonomy by taxonomy id
- Custom taxonomy terms registered not showing when added in child theme
- Redirect Custom Post Type from Child Taxonomies
- Ajax load more inside custom post type taxonomy
- Custom post edit page permalink links to edit page rather than the post
- Create a custom wp_query from a specific custom post type with specific taxonomy
- Not Able to List CPT Based on Taxonomy Term
- Show tags of custom post types in WordPress
- Show posts for current taxonomy
- Filter Term By Parent Term – Custom Post Type
- Display all Custom taxonomy terms and their relevant custom posts
- WordPress get all post with like in terms [duplicate]
- Best way to group posts based on custom post type terms
- Query Pulling the same post twice
- Cannot retrieve Custom Taxonomies (Disappeared)
- Custom Post type and Taxonomy in post URL error
- Render custom taxonomy query as single template
- Custom meta-box for all custom post types
- Loop multiple taxonomy in custom post
- Remove custom taxonomy ‘post-type’ from post URL
- Custom My account page and custom page for editing posts
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Require Custom Taxonomy for Custom Type
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Get all active posts that are tied to a custom taxonomy for a custom post type
- Rewrite Rule for custom post type link with or without taxonomy terms
- How to add to taxonomies to a post type