The solution is to use:
'taxonomy' => 'meal',
'field' => 'slug',
'terms' => 'breakfast'
The taxonomy
and terms
are obvious, but why does field have to be slug? When you add taxonomy parameters, you can specify what ‘breakfast’ is– via the field. It could be the term’s ID, the full name, or slug. See the codex on Taxonomy Parameters
Related Posts:
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- How to display an other custom post type in a different custom post type’s archive?
- Display custom tags on pages that have a specific page parent
- Filter Custom Taxonomy Posts
- How do I stop the same post showing multiple times in a archive?
- My entry results are not consistently alphabetized
- query_posts problem – need help
- Adding a language rule and displaying posts with a custom taxonomy term on its archive page
- When should you use WP_Query vs query_posts() vs get_posts()?
- When to use WP_query(), query_posts() and pre_get_posts
- Get post ids from WP_Query?
- Nested meta_query with multiple relation keys
- How do I exclude a custom taxonomy from the post loop
- Some doubts about how the main query and the custom query works in this custom theme?
- Wp get all the sub pages of the parent using wp query
- How to query for most viewed posts and show top 5
- WP Query where title begins with a specific letter
- WordPress tax_query “and” operator not functioning as desired
- Custom taxonomy query broken after upgrade to 4.4
- WP_Query vs get_posts
- Show posts without term
- How to add taxonomy filter on the query fly?
- Using WordPress to make a “Product Search” type navigation drilldown
- Using OR conditions in meta_query for query_posts argument
- Query Posts in a Predefined Order
- Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)
- Order posts by ID in the given order
- Query Multiple Post types each with own meta query
- Get posts by menu ID
- Get the number of posts from the current page results
- Display posts the match taxonomy term linked from wp_list_categoies?
- WordPress Custom Query to show posts from last x years
- Query two taxonomies via URL or link?
- Query Custom Meta Value with Increment
- How to know which one is the main query?
- Get posts by meta data OR title
- Perform query with meta_value date
- Using is_main_query to select custom post type on certain page
- WP_Query ordered by custom field that is a date string?
- get query’s query string
- Meta Query with date and time on the same Day before given time
- get_the_title($postID) OR get_the_title()?
- Counting number of posts with Category B in Category A
- Display Posts by modifying the where clause only for my query
- search query within custom taxonomy term, post title and meta field
- Custom archive page based on array of categories and tags
- how to group custom post type posts by custom taxonomy terms
- How do I create my own nested meta_query using posts_where / posts_join?
- Select posts wich has no relationship in custom taxonomy
- How to get the parent’s taxonomy?
- How to use filter hook posts_join for querying taxonomy terms in posts_where?
- Best practice for multiple queries on page
- How to Get All Posts but the Private ones?
- List taxonomy terms plus their latest post ordered by post date
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- How to query ‘posts_per_page’ to display a different blog posts index template?
- How to find out what “Blog pages show at most” is set to [duplicate]
- Filter and list posts of a custom taxonomy
- Advanced Tax Query
- Query for posts in 2 taxonomies
- Multiple search queries on one page
- tax_query shows no results if nothing is selected
- Pass the same object to multiple widgets in a template with one query
- Retrieve or Query Pages by ID
- How to Modify Taxonomy Archive Page with Search Parameter?
- Get array of current post term ID’s
- WP query exclude post within the last month / only show over 1 month old
- WordPress query for most recent posts from multiple categories
- How do you query wordpress posts using a math formula between multiple meta field values?
- How add a custom posttype name using ACF field to a query post array
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Setup of taxonomy term template pages
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Too many posts cause slow load when paginating
- Display link to taxonomy archive only if it has posts with certain custom field values
- How to do a query on custom taxonomies that is uncategorised?
- Page navigation doesn’t show when query category
- Multiple instances of Featured Image Query
- How can I pick a single post from the latest 3?
- 2 loops on page – one with orderby rand second orderby date
- How do you Query posts with nothing in common?
- Query post with meta_query where date is not in future
- WP_Query, tax_query and term_meta: How to?
- Order taxonomy terms in alphabetical order
- Next/Prev posts on same page
- Query Custom Post Type Order By Taxonomy Field
- Custom category search box for WordPress
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- Query post from all category with same tag on 1 pages
- Query posts by specific word on title
- How to query a custom post type with a taxonomy filter but display post type archive page?
- WP_Query last five posts, simply ordered by meta_value
- cannot get multiple loops using tax_query
- Query with a meta value inside a given range
- WP Pagination on Posts Search Results Page resulting from AJAX WP Query
- Function get_queried_object() return NULL in custom taxonomy
- Getting Taxonomy inside WP_Query Loop
- WP_Query “OR”: Find posts by ID, Name or Post Title?
- Order posts by taxonomy count
- Store sticky post’s ids in a transient