Created
July 15, 2018 17:37
-
-
Save BenBroide/17bee76d7a660b8d1f707f1cd6fe72a0 to your computer and use it in GitHub Desktop.
Generate posts with wp-cli with multiple meta fields
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 generate --format=ids --post_type=listing --count=100 | sed -e "s/ /\n/g" | xargs -n1 -I % sh -c 'echo "Adding fields for %"; wp post meta add % _address "531 east 2";wp post meta add % _country "United States"; wp post meta add % _zip "10000"; wp post meta add % _state "NY";wp post meta add % _house 35'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment