Attachment
For loop type attachment, here are the query parameters and fields.
Query parameters
Order
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
Core fields
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
Custom fields
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
Taxonomy
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
Pagination
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
All parameters
author- Include by author ID, login name, or "current"
Type: string, arraycategory- Include by category ID, slug, or "current"
Type: string, arraychild_terms- Set "true" to include child terms for hierarchical taxonomies
Type: stringcount- Limit number of items
Type: numbercustom_date_field- Filter by given custom date field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_date_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_date_field_format- For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.
Type: stringcustom_date_field_type- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value- Filter by given custom date field value, or "current"
Type: stringcustom_field- Filter by given custom field - Faster than using "field", this queries raw field values in the database
Type: stringcustom_field_2- See attribute "custom_field"
Type: stringcustom_field_3- See attribute "custom_field"
Type: stringcustom_field_compare- Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"
Type: stringcustom_field_compare_2- See attribute "custom_field_compare"
Type: stringcustom_field_compare_3- See attribute "custom_field_compare"
Type: stringcustom_field_type- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2- See attribute "custom_field_type"
Type: stringcustom_field_type_3- See attribute "custom_field_type"
Type: stringcustom_field_value- Filter by given custom field value
Type: stringcustom_field_value_2- See attribute "custom_field_value"
Type: stringcustom_field_value_3- See attribute "custom_field_value"
Type: stringexclude- Exclude by ID or name
Type: string, arrayexclude_author- Exclude by author ID, login name, or "current"
Type: string, arrayexclude_category- Exclude by category ID, slug, or "current"
Type: string, arrayexclude_parent- Exclude by parent ID or name
Type: string, arrayexclude_tag- Exclude by tag ID, slug, or "current"
Type: string, arrayfields-id- ID
Type: string, arrayinclude- Include by ID or name
Type: string, arrayinclude_children- Include children
Type: booleanname- Name/slug
Type: string, arrayorder- Order: asc (ascending) or desc (descending)
Type: string - Default: ascorderby- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field- Order by custom field
Type: stringorderby_field_number- Order by custom field whose value is a number
Type: stringpage- Page number
Type: number - Default: 1paged- Posts per page
Type: numberparent- Include by parent ID or name
Type: string, arraypost_type- Post type(s)
Type: string, arraypublish_compare- Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"
Type: stringpublish_date- Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute
Type: stringpublish_day- Filter by given publish day of the month, from 1 to 31, or "current"
Type: numberpublish_month- Filter by given publish month, from 1 to 12, or "current"
Type: numberpublish_week- Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field
Type: numberpublish_year- Filter by given publish year, or "current"
Type: numbersearch- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it
Type: stringstatus- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishsticky- Sticky posts: true (stick to top), false (exclude them), only (exclude normal posts) - By default, they are treated the same as normal posts
Type: stringtag- Include by tag ID, slug, or "current"
Type: string, arraytaxonomy- Include by taxonomy ID, slug, or "current" for taxonomy archive<br>Use with "term" and "taxonomy_compare" attributes
Type: string, numbertaxonomy_2- See attribute "taxonomy"
Type: string, numbertaxonomy_3- See attribute "taxonomy"
Type: string, numbertaxonomy_compare- One of "in" (default), "not", "and", "exists", and "not exists"<br>Use with "taxonomy" attribute
Type: stringtaxonomy_compare_2- See attribute "taxonomy_compare"
Type: stringtaxonomy_compare_3- See attribute "taxonomy_compare"
Type: stringtaxonomy_relation- When using more than one "taxonomy" queries, can specify "and" or "or"
Type: stringterms- Include by taxonomy term ID, slug, or "current"<br>Use with "taxonomy" attribute
Type: string, number, arrayterms_2- See attribute "terms"
Type: string, number, arrayterms_3- See attribute "terms"
Type: string, number, arraytype-
Type: string, array
Fields
Attachment fields
alt- Image attribute altcaption- Captiondescription- Descriptionextension- File extensionfilename- File nameid- IDimage- Imagesize- File sizesizes- Responsive image attribute "sizes" for img tag - Accepts optional attribute "size" for image size name (default is "medium"), or width and height values in pixels separated by comma like "400,300"srcset- Responsive image attribute "srcset" for img tag - Accepts optional attribute "size" for image size name (default is "medium"), or width and height values in pixels separated by comma like "400,300"title- Titletype- File typeurl- URL - Accepts optional attribute "size" for image size
All fields
all- Show all custom fields (for development purpose)alt- Image attribute altancestors- Ancestor posts from lowest to highest level; Set reverse=true to go from top-level down
Loop type: currentarchive_author- On an author archive page: Current author as a user looparchive_post_type- On a post type archive page: Current post type as a looparchive_term- On a taxonomy archive page: Current taxonomy term as a loopauthor- Author
Loop type: userauthor_*- Modified author's user field
Loop type: usercaption- Captionchildren- Children
Loop type: currentchildren_ids- Children IDs
Loop type: currentcontent- Contentdescription- Descriptionedit_url- Edit URLexcerpt- Excerptextension- File extensionfilename- File nameid- IDimage- Imageimage_*- Featured image field
Loop type: attachmentmenu_order- Menu ordermodified_author- Modified author
Loop type: usermodify_date- Modify datename- name/slugparent- Parent
Loop type: currentparent_*- Parent field
Loop type: currentparent_ids- All parent IDs from current to toppost_class- Post classespublish_date- Publish datesize- File sizesizes- Responsive image attribute "sizes" for img tag - Accepts optional attribute "size" for image size name (default is "medium"), or width and height values in pixels separated by comma like "400,300"srcset- Responsive image attribute "srcset" for img tag - Accepts optional attribute "size" for image size name (default is "medium"), or width and height values in pixels separated by comma like "400,300"status- Statustitle- Titletype- File typeurl- URL - Accepts optional attribute "size" for image size