Retrieve the ID of your newly inserted post and use add_post_meta to give it a custom field
Would you provide further information
Hi
Please someone help
I am a newbie at WordPress codex
I need to know how can I make visible custom field in my post area section. It should be a part of my theme I have uploaded but unfortunately I don’t receive support from them.
Any help will be appreciated
Henry
Does anyone have an example of using wp_insert_post along with add_post_meta? The concept seems pretty clear but I haven’t been able to get it working without an example.
Thanks in advance! (and if I get it working I’ll post here)
Found the solution here: http://wordpress.stackexchange.com/questions/8569/wp-insert-post-php-function-and-custom-fields
Basically you just need to add something like this right after wp_insert_post();
add_post_meta($post_id, ‘META-KEY-1’, ‘META_VALUE-1’, true);