Last active
April 2, 2023 20:11
-
-
Save eSaner/855307b49a261d0966c71ae9735b91d5 to your computer and use it in GitHub Desktop.
Update multiple posts with WP-CLI
This file contains 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
/** | |
* Command line | |
* | |
* @source https://git.pub/snippets/4 | |
*/ | |
for id in $(wp post list --post_type=my_post_type --fields=ID --format=ids); do wp post update $id --post_title="Page Number $id"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment