[wp-hackers] Post ID and New Post Problem

Sinan sinan at sinanisler.com
Thu Jul 12 22:16:21 UTC 2012


As you know with wp_insert_post() function we can add new posts

we cant add  custom field because add_post_meta() function need Post ID

But our problem start here with wp_insert_post function creating new post
we dont have a Post ID

so we cant add same time new post and custom field values. We can use only
add_post_meta function for existed posts.

I need a solution for this. I need create post and add custom fields same

By the way I see same problem for attachments.

I hope we can find a solution for this.

sinanisler.com <http://www.sinanisler.com>

More information about the wp-hackers mailing list