How do I set the taxonomy for a new post using wp-cli?
-
I’m trying to create new posts using WordPress CLI. So far I can create a post, but not set it’s taxonomy, because I don’t know the format for doing this. My command looks like this:
wp post create \ --post_title='testing' \ --post_status='draft' \ --post_type='class_notes' \ --tax_input=( ["course"] = "en213" )
The line I need help with is the last one. I don’t know how to format that array correctly. I will need to have set several taxonomies all at the same time.
I do appreciate any help with this.
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How do I set the taxonomy for a new post using wp-cli?’ is closed to new replies.