wp_create_term
Create a new WordPress term (category, tag, or custom taxonomy) by specifying taxonomy, name, and optional slug, parent, or description. Use dry-run to preview before applying.
Instructions
Create one term (a category, tag, or any custom taxonomy term).
taxonomy is a slug from wp_list_taxonomies. slug is derived from the name when
omitted. parent (a term id from wp_list_terms, 0 = top level) only applies to a
HIERARCHICAL taxonomy - WordPress ignores it on tags. Creating a term does not
assign it to anything: use wp_set_post_terms for that. DEFAULTS TO dry_run=true
(returns a preview; writes nothing). Pass dry_run=false to apply - the create is
verified by reading the term back. Requires the REST transport. Prod writes require
allow_prod=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| slug | No | ||
| parent | No | ||
| dry_run | No | ||
| install | Yes | ||
| taxonomy | Yes | ||
| allow_prod | No | ||
| description | No |