Hi!
I've been looking for hours on end. Want to get an image NAME from another server/domain into a custom field form on my site's front end without logging in. The images are supposed to stay on that other server. I just need to store the names and couldn't find a way with custom fields in the $post array. My array (only for testing) looks like this:
$post = array(
'comment_status' => 'open',
'post_category' => array(3),
'post_content' => $write_post_content,
'post_status' => 'publish',
'post_title' => $write_post_title,
'post_type' => 'post',
'tags_input' => 'custom design','my designs'
);
// Insert the post into the database
wp_insert_post( $post,$wp_error );
Now, how do you get something like a post meta name and value (something like the below) in there in the wp_insert_post function? As you understand I'm not all that good at programming ;)
add_post_meta($post_id, 'my_image_url', $write_post_image;, true);