wp_taxonomies_assign_to_post
Replace a post's categories and tags by assigning new term ID arrays. Fetch the post first to preserve existing taxonomies when adding.
Instructions
Replace the categories and/or tags of a post. The arrays REPLACE existing taxonomies (use wp_posts_get first if you want to preserve existing terms and add to them).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"post_id": "<post_id>"
},
"name": "wp_taxonomies_assign_to_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | Yes | ||
| tag_ids | No | ||
| category_ids | No |