List terms
wp_list_termsLists categories, tags or custom taxonomy terms ordered by name, with search, per_page and hide_empty filters, returning term ID, slug and count for review.
Instructions
List the terms of one taxonomy (categories, tags or a custom taxonomy), ordered by name. Returns terms: [{term_id, name, slug, count, parent}]; count is the number of objects WordPress counts for the term, parent is 0 at the top level. Only the first per_page matches are returned; there are no further pages. Terms of a non-public taxonomy need the right to assign them. Read-only; wp_get_term returns one term with its description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Only terms whose name or slug contains this text. | |
| per_page | No | Maximum number of terms, 1–500; other values are clamped. Default 100. | |
| taxonomy | Yes | Taxonomy name, e.g. "category", "post_tag" or a custom one, as wp_get_taxonomies lists it. An unknown taxonomy is refused. | |
| hide_empty | No | true leaves out terms whose count is 0; in a hierarchical taxonomy a parent stays when a descendant is not empty. Default false. |