capabilities.work

Tag an Existing Post

A 3-step recipe with WordPress. We can help you get access.

Recipe · 3 steps

Tag an Existing Post

Resolve a tag by name and assign it to an existing post.

  1. Search the tags collection for a tag matching the supplied name, returning at most one result.
  2. Read the target post by id to confirm it exists before updating its tags.
  3. Update the post so the matched tag id is assigned in its tags taxonomy.
What you'll need to have ready
  • authorization: HTTP Basic Authorization header value built from a WordPress Application Password (e.g. "Basic dXNlcjpwYXNzd29yZA==").
  • tagName: The tag name to resolve (e.g. "wordpress").
  • postId: The id of the post the tag should be applied to.
For your developer

Arazzo workflow wordpress:tag-an-existing-post, 3 operations: listTags → getPost → updatePost. Specs on APIs.io.