For loop type taxonomy_term
, here are the query parameters and fields.
children
- Set true to include only child termsexclude
- Exclude terms by ID(s) or slug(s)hide_empty
- Hide terms not assigned to any post - true or false (default)id
- Get terms by ID(s)include
- Include terms by ID(s) or slug(s)name
- Get terms by name/slug(s)order
- Order: asc (ascending) or desc (descending)asc
orderby
- Order by one of: name, title (default), term_id, menu_order, counttitle
orderby_field
- Order by custom fieldorderby_field_number
- Order by custom field whose value is a numberparent
- Get terms by its parent term's ID or slugparents
- Set true to include only top-level parent termspost
- Corresponding post ID(s) for term retrieval or "current" for current posttaxonomy
- Get terms by taxonomyterms
- Alias for "include"ancestors
- Ancestor term IDs (or loop instance) from lowest to highest level; Set reverse=true to go from top-level downchildren
- Children term IDs (or loop instance)count
- Post countid
- Term IDname
- Term nameparent
- Parent term ID (or loop instance)posts
- Loop instance of posts that belong to current termtaxonomy
- Taxonomy name (or loop instance)title
- Term titleurl
- URL to term archive pageUse the taxonomy
attribute as a shortcut.
<Loop taxonomy=category>
<Field title />
</Loop>
The above is the same as:
<Loop type=taxonomy_term taxonomy=category>
<Field title />
</Loop>
The Taxonomy
tag provides another way to express it.
<Taxonomy category>
<Term title />
</Taxonomy>