Create a taxonomy term
wp_create_term creates a category, tag or manageable custom-taxonomy term. Read existing terms with wp_get_terms first to avoid duplicates.
Required arguments are taxonomy and name. Optional fields are slug, description, parent, thumbnail_id, background_image_id, order and dry_run. POM image and position fields have the same meaning as in Update a term. They require active POM Theme.
- Discover the taxonomy and check its hierarchy and management permission.
- Choose the display name and public slug. If omitted, WordPress derives the slug from the name. A nonzero parent must belong to the same hierarchical taxonomy.
- Preview with
dry_run: true.would_createincludes the name and other supplied term fields;pomcontains resolved image URLs and position. - Submit the intended write and approve the exact request.
- Repeat it with
approval_id, then inspectcomplete,failed_fields,term_idand the fulltermsnapshot. - Assign the term to content separately with
wp_add_post_terms.
The taxonomy's own management and edit capabilities are required, plus content-write scopes and the content write gate. WordPress can refuse duplicate terms. An interrupted create may already have created the term: search and inspect before requesting another creation.
Creating terms does not assign their translation language or translation links. Those remain under the site's translation workflow.