Last active
July 8, 2022 14:04
-
-
Save petenelson/1c7158837fac36bd361cf759e20f891e to your computer and use it in GitHub Desktop.
WordPress: CLI command to add a new term to posts based on an existing term
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp post list --taxonomy_name=existing-term-slug --format=ids | xargs -0 -d ' ' -I % wp post term add % taxonomy_name new-term-slug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment