Skip to content

Instantly share code, notes, and snippets.

@twentyfortysix
Last active April 1, 2021 11:32
Show Gist options
  • Save twentyfortysix/7ea1d8036b2f9762d2a09e1ba64f119e to your computer and use it in GitHub Desktop.
Save twentyfortysix/7ea1d8036b2f9762d2a09e1ba64f119e to your computer and use it in GitHub Desktop.
wp-cli - delete post by meta
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