Last active
December 19, 2015 13:09
-
-
Save rileypaulsen/5960565 to your computer and use it in GitHub Desktop.
retroactively add custom fields to existing posts
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
insert into wp_postmeta (post_id, meta_key, meta_value) select ID, '###FIELDNAME###', '1' from wp_posts WHERE post_type = '###POSTTYPE###' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment