The query looks about right and I know that meta_query
and tax_query
work together just fine. the only thing i can think of is that you are query taxonomy by slug and passing the term id which are two different things, change:
'field' => 'slug',
with
'field' => 'id',
in your tax_query.
Related Posts:
- Using meta_query, how can i filter by a custom field and order by another one?
- Mixing regular and custom post types (with meta_query) on home page
- meta_query for keys that aren’t yet set
- Fail to compare dates in meta_query
- Get posts based on meta key/value
- WP_Query() show posts that end later than today
- WP_Query orderby custom field then post_date in one query
- Filtering a WP_Query meta_query by numeric values isn’t working
- Ordering posts having multiple post-meta date fields
- Querying custom post type with 2 custom fields (date-range)
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- How Can I save multiple records in same meta key?
- Order Posts by Taxonomy and Meta Value
- filter search result with custom post type meta key
- I can’t set meta_key in my custom post type query
- order by meta_value serialized array
- Meta Query “IN” doesn’t work with ACF checkbox filter
- Using Query Posts With Multiple Post Types And A Taxonomy
- Can’t sort order of wp_query with 2 meta keys
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- Combine tax_query and meta_query in WP_Query
- query order by date on custom type: wrong order
- Used with meta_query in query_posts works slowly
- exclude custom post type by meta key in wp_query
- How loop through posts based on custom fields
- Custom query variable – get wordpress to redirect to nice permalink url
- Filter posts with meta_query NOT IN where value has multiple values
- Display custom post types with custom date field value (before today) & order by custom date field
- Displaying Metabox value (custom post type taxonomy)
- Query for custom post type objects in a taxonomy and with a meta value
- Display custom post type taxonomy and month
- Meta_query with relation ‘OR’ killing server CPU
- CPT Meta Searching
- Filtering by Post Meta Custom Fields – Performance
- Ignore sticky posts if post is not in meta query
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- Query that joins the postmeta table twice
- meta_query compare >= not working but
- advanced search forms with 3 input text and that the main problem 3 input text
- Pull a post based on a meta value in a custom post type
- Setting proper query for multiple custom admin filters
- WP_Query: include custom post type only with specific meta value
- Sorting Custom Post Type by Meta Value but wont display when set to 0
- How to alter WP-JSON main query or best practise for custom endpoints
- Returning a list of custom post types excluding those without a specific meta_value
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- wp_query check if integer exists in custom field’s array
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- Get posts between custom dates
- filter custom post type by meta key in dashboard
- Meta query for custom post type ignored in main query
- How to filter wp_list_categories output with some custom post type meta query?
- Display a CPT based on a metabox selection
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How to do WP_Query with two meta fields with orderby clause
- Stuck in Order by more then one
- Meta Query Not Returning Output Despite Having Matching Values
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- WP Meta query for a custom post type based on two values
- Why is this query not working? (Standard posts + custom post type)
- Using meta_query and tax_query at the same time
- search suggest – filter post type
- Meta Query posts not showing on ending date of custom field
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Ordering custom post type by multiple custom fields
- How to Output which matched meta_keys were found from custom_type_posts?
- Possible to filter custom post type with multiple meta data?
- filter search custom field query
- How to let users choose where to search for posts?
- Query based on custom fields start and end date
- WP_query – Filter by tax_query and meta_query using multiple select
- Is it possible to load a different sidebar in single.php based on a meta_query filter?
- Getting a custom post’s custom field based on another custom post’s custom field select
- Querying multiple values from a single key
- find custom post type post by searching its custom field with my string
- Get category if used in a custom post type
- WP_Query of custom post type sorted by meta_key has unexpected results
- Custom Query: If One Post Object Field Value Is The Same As Another
- Query for post and costom post_type in same category filtered by meta for post_type
- If meta_value of meta_key is less than today’s date update meta key
- fetch custom post by meta key if key value is does not know
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- Query Posts, order by meta value
- WP_Meta_Query object with conditionals
- Get Posts ordered by a date custom meta field
- Check for custom field value in different post type than current one and do something
- Order Wp Query by earliest of 3 dates meta query
- Function to Compare CPT Post Custom Value with Default Posts CF Value
- WP_Query() displaying past post / event
- WP Query Conditionally query meta and taxonomy
- Meta_query question
- WP_Query not using relation key as expected and not producing any results
- WP Query filtering by custom category not showing all relevant posts
- getEntityRecords/useEntityRecords: How to use CPT metadata?
- Meta query with ACF relationship field
- Meta query sort order is lexigraphical instead of numeric
- How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?
- Query custom fields with three dates – start and end does not work