Loop: Taxonomy term

For loop type taxonomy_term, here are the query parameters and fields.

Query parameters

  • exclude - Exclude terms by ID(s) or slug(s)
    Type: string, array
  • hide_empty - Hide terms not assigned to any post - true or false (default)
    Type: boolean
  • id - Get terms by ID(s)
    Type: number, array
  • include - Include terms by ID(s) or slug(s)
    Type: string, array
  • name - Get terms by name/slug(s)
    Type: string, array
  • order - Order: asc (ascending) or desc (descending)
    Type: string
    Default: asc
  • orderby - Order by one of: name, title (default), term_id, menu_order, count
    Type: string
    Default: title
  • orderby_field - Order by custom field
    Type: string
  • orderby_field_number - Order by custom field whose value is a number
    Type: string
  • parent - Get terms by its parent term's ID or slug
    Type: number, string
  • parents - Include only top-level parent terms
    Type: boolean
  • post - Corresponding post ID(s) for term retrieval or "current" for current post
    Type: number, array
  • taxonomy - Get terms by taxonomy
    Type: string

Fields

  • ancestors - Ancestor term IDs (or loop instance) from lowest to highest level; Set reverse=true to go from top-level down
  • children - Children term IDs (or loop instance)
  • count - Post count
  • id - Term ID
  • name - Term name
  • parent - Parent term ID (or loop instance)
  • taxonomy - Taxonomy name (or loop instance)
  • title - Term title
  • url - URL to term archive page