views:

55

answers:

1

I have asked here(http://stackoverflow.com/questions/1670838/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...

A: 

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");
}
Uffo