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
- When should you use WP_Query vs query_posts() vs get_posts()?
- Get post ids from WP_Query?
- 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?
- How to query for most viewed posts and show top 5
- Using OR conditions in meta_query for query_posts argument
- Get posts by menu ID
- Display posts the match taxonomy term linked from wp_list_categoies?
- WordPress Custom Query to show posts from last x years
- Perform query with meta_value date
- Meta Query with date and time on the same Day before given time
- get_the_title($postID) OR get_the_title()?
- Custom archive page based on array of categories and tags
- How do I create my own nested meta_query using posts_where / posts_join?
- How to get the parent’s taxonomy?
- Best practice for multiple queries on page
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- How to find out what “Blog pages show at most” is set to [duplicate]
- tax_query shows no results if nothing is selected
- Retrieve or Query Pages by ID
- Get array of current post term ID’s
- How do you query wordpress posts using a math formula between multiple meta field values?
- 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
- How to do a query on custom taxonomies that is uncategorised?
- Multiple instances of Featured Image Query
- How do you Query posts with nothing in common?
- Order taxonomy terms in alphabetical order
- Query Custom Post Type Order By Taxonomy Field
- 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 with a meta value inside a given range
- Getting Taxonomy inside WP_Query Loop
- Order posts by taxonomy count
- Store sticky post’s ids in a transient
- Query/list all terms and their custom post count
- How to display multiple custom fields with the same meta_key in an ascending order?
- Bypass “supress_filters” in WP Query
- How do I exclude the lowest level terms in a taxonomy?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- wp_query args adding muitiple tax_querys
- How to increase load time of an archive/search page (WP_Query)
- How to display Related Posts based on number of taxonomy terms matched
- find posts that don’t have a custom taxonomy
- Exclude All Posts Which Do Not Have A Tag Assigned
- How to make WP_Query not to show irrelevant posts?
- get all posts associated with a custom taxonomy
- How to set an alternate posts_per_page value for default queries in different templates
- Easy way to write complex queries in wordpress
- get_posts output always same post
- Using WP_Query and Query_post for the loop?
- Conditional operator OR not working with custom fields
- complex get_posts() query to select child pages
- How to add custom meta to ‘pre_get_terms’?
- Tax Query only returns for the first of several terms
- Can’t fetch Custom Post Type Data through Custom Query
- Get posts that do not have the same tags as current
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Should I reset $wp_query?
- One WP_Query that always shows 1 post from category X and 1 post from “not in category X”?
- How to print term name inside wp post loop
- Posts query according to meta box date
- Get next/prev image/attachment in time with date query
- Max Posts and Memory Limit
- How to query for a page, get data, then query for child pages of that page
- Optimising WP_Query with ACF Fields
- Query post and sort by custom value calculated with custom field on cpt
- Why is my pagination /page/2 taking me to index.php?
- Filter products on category AND tag
- Query post ordered by meta value that show first post that contained a tag
- custom post type and a “sticky” position taxonomy
- pre_user_query vs pre_get_posts
- WP Query for all events prior to current date
- list all post who have mutual taxonomy as current taxonomy!
- Problem with my loops
- Displaying posts from sub taxonomies only
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- I cannot get tax_query in get_posts() to work with custom taxonomy
- query_posts() doesn’t seem to be called in my page
- Modify query to exclude certain ids and certain parents and its corresponding children
- How to order by datediff in WP loop?
- Custom query for tag and custom tag from 2 post type
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- WordPress custom post type
- Hiding all posts/products/pages from a site based on a custom taxonomy/domain name
- Optimising specific Query with ACF meta objects
- query_posts with sorting on a custom datestamp
- Query Posts by date range with fixed beginning and end
- Exclude categories and subcategories in QueryLoop
- Incorrect posts displayed on category page