wp post term add

Add a term to an object.

Append the term to the existing set of terms on the object.

wp post term add <id> <taxonomy> <term>... [--by=<field>]

Options

<id>

The ID of the object.

<taxonomy>

The name of the taxonomy type to be added.

<term>...

The slug of the term or terms to be added.

[--by=<field>]

Explicitly handle the term value as a slug or id. [Default: slug]

Options:
  • slug
  • id