Title: wp post term
Published: February 5, 2018
Last modified: April 13, 2026

---

# 󠀁[wp post term <command>](https://developer.wordpress.org/cli/commands/post/term/)󠁿

Adds, updates, removes, and lists post terms.

## In this article

 * [Examples](https://developer.wordpress.org/cli/commands/post/term/?output_format=md#examples)
 * [Subcommands](https://developer.wordpress.org/cli/commands/post/term/?output_format=md#subcommands)

[ Back to top](https://developer.wordpress.org/cli/commands/post/term/?output_format=md#wp--skip-link--target)

 [ ⌊GitHub⌉ ](https://github.com/wp-cli/entity-command)

 [ View Open Issues (0) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Apost-term+sort%3Aupdated-desc+org%3Awp-cli+is%3Aopen)
[ View Closed Issues (8) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Apost-term+sort%3Aupdated-desc+org%3Awp-cli+is%3Aclosed)
[Create New Issue](https://github.com/wp-cli/entity-command/issues/new)

### 󠀁[Examples](https://developer.wordpress.org/cli/commands/post/term/?output_format=md#examples)󠁿

    ```
    # Set category post term `test` to the post ID 123
    $ wp post term set 123 test category
    Success: Set term.

    # Set category post terms `test` and `apple` to the post ID 123
    $ wp post term set 123 test apple category
    Success: Set terms.

    # List category post terms for the post ID 123
    $ wp post term list 123 category --fields=term_id,slug
    +---------+-------+
    | term_id | slug  |
    +---------+-------+
    | 2       | apple |
    | 3       | test  |
    +----------+------+

    # Remove category post terms `test` and `apple` for the post ID 123
    $ wp post term remove 123 category test apple
    Success: Removed terms.
    ```

### 󠀁[Subcommands](https://developer.wordpress.org/cli/commands/post/term/?output_format=md#subcommands)󠁿

| Name | Description | 
| [wp post term add](https://developer.wordpress.org/cli/commands/post/term/add/) |

Add a term to an object.

  | 
| [wp post term list](https://developer.wordpress.org/cli/commands/post/term/list/) |

List all terms associated with an object.

  | 
| [wp post term remove](https://developer.wordpress.org/cli/commands/post/term/remove/) |

Remove a term from an object.

  | 
| [wp post term set](https://developer.wordpress.org/cli/commands/post/term/set/) |

Set object terms.

  |

 _Command documentation is regenerated at every release. To add or update an example,
please submit a pull request against the corresponding part of the codebase._