Skip to main content
Taxonomy abilities let you manage terms in any registered WordPress taxonomy and control which terms are assigned to your posts, pages, and custom post types. You can assign terms one at a time, replace all terms in a taxonomy in a single call, or update terms across hundreds of posts at once with the bulk operation.

All taxonomy abilities

All taxonomy abilities work with any registered taxonomy: category, post_tag, product_cat, or any custom taxonomy on your site.

Key ability examples

maxi/create-term

Create a new term. The slug is optional — if omitted, WordPress generates one from the name.

maxi/assign-terms

Add terms to a post without removing any currently assigned terms. Pass term IDs.

maxi/set-terms

Replace all terms on a post for a given taxonomy. Any terms not in the terms array are removed.
To clear all terms from a post in a taxonomy, use maxi/set-terms with an empty terms array: "terms": [].

maxi/bulk-update-terms

Update terms across many posts at once. Accepts either a single object_id or an object_ids array. Use the mode field to control how terms are applied.
Replaces all existing terms in the taxonomy with the provided list. Pass an empty terms array to clear all terms from every object in the batch.
Adds the provided terms to each object while keeping any terms already assigned. No existing term assignments are removed.
Removes only the specified terms from each object. Other term assignments are left untouched.
maxi/bulk-update-terms supports up to 500 objects and 100 terms per call. Requests that exceed these limits are rejected.

Yoast SEO integration

If the Yoast SEO plugin is active on your site, you can set SEO metadata on taxonomy terms using maxi/set-yoast-term-seo.
This ability creates the wpseo_taxonomy_meta record if it does not exist and merges with any existing Yoast keys — it does not overwrite other Yoast settings like canonical or noindex. When the Yoast Indexables table is available, the matching row is synced automatically. The response includes indexable_synced: true when that sync succeeded.
maxi/set-yoast-term-seo requires the Yoast SEO plugin to be installed and active (WPSEO_VERSION must be defined). The ability returns an error if Yoast is not available.