@@ -2793,10 +2793,27 @@ wp post term
27932793
27942794** EXAMPLES**
27952795
2796- # Set post terms
2796+ # Set category post term `test` to the post ID 123
27972797 $ wp post term set 123 test category
2798+ Success: Set term.
2799+
2800+ # Set category post terms `test` and `apple` to the post ID 123
2801+ $ wp post term set 123 test apple category
27982802 Success: Set terms.
27992803
2804+ # List category post terms for the post ID 123
2805+ $ wp post term list 123 category --fields=term_id,slug
2806+ +---------+-------+
2807+ | term_id | slug |
2808+ +---------+-------+
2809+ | 2 | apple |
2810+ | 3 | test |
2811+ +----------+------+
2812+
2813+ # Remove category post terms `test` and `apple` for the post ID 123
2814+ $ wp post term remove 123 category test apple
2815+ Success: Removed terms.
2816+
28002817
28012818
28022819
@@ -2823,6 +2840,7 @@ Append the term to the existing set of terms on the object.
28232840 [--by=<field>]
28242841 Explicitly handle the term value as a slug or id.
28252842 ---
2843+ default: slug
28262844 options:
28272845 - slug
28282846 - id
@@ -2899,11 +2917,12 @@ wp post term remove <id> <taxonomy> [<term>...] [--by=<field>] [--all]
28992917 The name of the term's taxonomy.
29002918
29012919 [<term>...]
2902- The name of the term or terms to be removed from the object.
2920+ The slug of the term or terms to be removed from the object.
29032921
29042922 [--by=<field>]
29052923 Explicitly handle the term value as a slug or id.
29062924 ---
2925+ default: slug
29072926 options:
29082927 - slug
29092928 - id
@@ -2936,6 +2955,7 @@ Replaces existing terms on the object.
29362955 [--by=<field>]
29372956 Explicitly handle the term value as a slug or id.
29382957 ---
2958+ default: slug
29392959 options:
29402960 - slug
29412961 - id
@@ -5506,6 +5526,7 @@ Append the term to the existing set of terms on the object.
55065526 [--by=<field>]
55075527 Explicitly handle the term value as a slug or id.
55085528 ---
5529+ default: slug
55095530 options:
55105531 - slug
55115532 - id
@@ -5582,11 +5603,12 @@ wp user term remove <id> <taxonomy> [<term>...] [--by=<field>] [--all]
55825603 The name of the term's taxonomy.
55835604
55845605 [<term>...]
5585- The name of the term or terms to be removed from the object.
5606+ The slug of the term or terms to be removed from the object.
55865607
55875608 [--by=<field>]
55885609 Explicitly handle the term value as a slug or id.
55895610 ---
5611+ default: slug
55905612 options:
55915613 - slug
55925614 - id
@@ -5619,6 +5641,7 @@ Replaces existing terms on the object.
56195641 [--by=<field>]
56205642 Explicitly handle the term value as a slug or id.
56215643 ---
5644+ default: slug
56225645 options:
56235646 - slug
56245647 - id
0 commit comments