1

I have a question. A created a custom field named video_desc. I have ofer 2000 posts and I need to add this custom field to all posts and add the text "Description Here" to it. How can this be done with SQL Query because all plugins I used didn't worked as it should. TThanks!

1

I manage to work my problem. For those who seek the same answer, just run this query

INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
SELECT wp_posts.ID, 'video_desc', 'Description here'
FROM wp_posts
WHERE wp_posts.post_status = 'publish';

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.