0

I have a question. I am running detube theme which has a custom field named "dp_video_code" in which i put my video embeded code. Recently the embeded code has change and I need to modify the video code in all posts(I need to replace the text "preview" from the code with "edit"). Is there anyway to do this without take all posts one by one? Can I be done with a sql query? If yes what would that be? I saw some plugins like "Custom Field Bulk edit" but it isn't what I search. This is how the custom field looks: I need to replace the "preview" with "edit" in all posts

Thanks!

0

FIRST BACKUP!!!!!

NEXT, BE SURE THE BACKUP IS RIGHT

Now, you can use this code in PHPMyAdmin

UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'preview', 'edit') WHERE meta_key = 'dp_video_code'

Make sure that's the correct name of the custom field, you can check it in the wp_postmeta table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.