Query Arguments
Topics
The Events Calendar ORM can be used to query the database. This is a comprehensive list of the arguments used to query posts. We will be adding more specific lists for arguments specific to events, attendees, organizers, and venues.
Individual Posts
ID/id: The unique numeric identifier of the post to be queried.
Content Related
search: A string value to search for within the title or content of the posts.post_status: An array of post statuses to be included in the query (e.g., ‘publish’, ‘draft’, ‘pending’).title_like: A string value to search for within the title of the posts.post_content: A string value to search for within the content of the posts.post_excerpt: A string value to search for within the excerpt of the posts.
Miscellaneous
to_ping: A string value to search for within the ‘to_ping’ field of the posts.post_content_filtered: A string value to search for within the filtered content of the posts.guid: A string value to search for within the GUID of the posts.menu_order: An integer value representing the menu order of the posts to be queried.
Post publish date
date/after_date: A date string to fetch posts published after the specified date.before_date: A date string to fetch posts published before the specified date.date_gmt/after_date_gmt: A date string to fetch posts based on thepost_date_gmtfield, published after the specified date.before_date_gmt: A date string to fetch posts based on thepost_date_gmtfield, published before the specified date.
Post modified date
post_modified: A date string to fetch posts modified after the specified date.post_modified_gmt: A date string to fetch posts based on thepost_modified_gmtfield, modified after the specified date.
Meta related
meta_equals: Query posts based on custom meta fields where the meta key is equal to the specified value.meta_not_equals: Query posts based on custom meta fields where the meta key is not equal to the specified value.meta_gt: Query posts based on custom meta fields where the meta key is greater than the specified value.meta_greater_than: Same asmeta_gt.meta_gte: Query posts based on custom meta fields where the meta key is greater than or equal to the specified value.meta_greater_than_or_equal: Same asmeta_gte.meta_like: Query posts based on custom meta fields where the meta key is like the specified value.meta_not_like: Query posts based on custom meta fields where the meta key is not like the specified value.meta_lt: Query posts based on custom meta fields where the meta key is less than the specified value.meta_less_than: Same asmeta_lt.meta_lte: Query posts based on custom meta fields where the meta key is less than or equal to the specified value.meta_less_than_or_equal: Same asmeta_lte.meta_in: Query posts based on custom meta fields where the meta key is in the specified array of values.meta_not_in: Query posts based on custom meta fields where the meta key is not in the specified array of values.meta_between: Query posts based on custom meta fields where the meta key is between the specified range of values.meta_not_between: Query posts based on custom meta fields where the meta key is not between the specified range of values.meta_exists: Query posts based on custom meta fields where the specified meta key exists.meta_not_exists: Query posts based on custom meta fields where the specified meta key does not exist.meta_regexp: Query posts based on custom meta fields where the meta key matches the specified regular expression.meta_equals_regexp: Same asmeta_regexp.meta_not_regexp: Query posts based on custom meta fields where the meta key does not match the specified regular expression.meta_not_equals_regexp: Same asmeta_not_regexp.meta_regexp_or_like: Query posts based on custom meta fields where the meta key matches the specified regular expression or is like the specified value.meta_equals_regexp_or_like: Same asmeta_regexp_or_like.meta_not_regexp_or_like: Query posts based on custom meta fields where the meta key does not match the specified regular expression and is not like the specified value.meta_not_equals_regexp_or_like: Same asmeta_not_regexp_or_like.
Taxonomy related
taxonomy_exists: Query posts based on a taxonomy where the specified taxonomy exists.taxonomy_not_exists: Query posts based on a taxonomy where the specified taxonomy does not exist.term_id_in: Query posts that have terms with the specified IDs in the given taxonomy.term_id_not_in: Query posts that do not have terms with the specified IDs in the given taxonomy.term_id_and: Query posts that have all the terms with the specified IDs in the given taxonomy.term_name_in: Query posts that have terms with the specified names in the given taxonomy.term_name_not_in: Query posts that do not have terms with the specified names in the given taxonomy.term_name_and: Query posts that have all the terms with the specified names in the given taxonomy.term_slug_in: Query posts that have terms with the specified slugs in the given taxonomy.term_slug_not_in: Query posts that do not have terms with the specified slugs in the given taxonomy.term_slug_and: Query posts that have all the terms with the specified slugs in the given taxonomy.term_in: Query posts that have the specified terms in the given taxonomy (terms can be IDs, slugs, or names).term_not_in: Query posts that do not have the specified terms in the given taxonomy (terms can be IDs, slugs, or names).term_and: Query posts that have all the specified terms in the given taxonomy (terms can be IDs, slugs, or names).