Last active
August 9, 2024 03:02
-
-
Save davemac/d2547151899515c68ad2d7d1b36ec173 to your computer and use it in GitHub Desktop.
wp-cli delete all featured images of a post type
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 --post_type=dmc-sief-project --fields=ID --format=csv | xargs -I % wp post meta delete % _thumbnail_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this! Be warned, as with all wp-cli stuff that iterates over a large number of things, this is slow