Last active
April 1, 2021 11:32
-
-
Save twentyfortysix/7ea1d8036b2f9762d2a09e1ba64f119e to your computer and use it in GitHub Desktop.
wp-cli - delete post by meta
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
for POST in $(wp post list --post_type=locations --meta_key=page_subtype --meta_value=event --format=ids); do wp post delete $POST --force; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment