1

I have asked here(Inserting a post in Wordpress using MySql) about how to insert a post in wordpress using mysql, but now I also need to insert some custom fields values, for example: if I have a custom_field called stack how can I insert a value for that custom field using mysql...

1 Answer 1

2

Ok I found this here: http://www.samburdge.co.uk/wordpress/wp-plugins-and-custom-fields

function add_custom_field($id) {
    //Add your value as a custom field with the key 'myKey'
    //but only if the form data exists
    add_post_meta($id, 'thumb_url', "value");
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.