Calling wp_insert_post to create a post with assigned ID in WordPress
Regarding ‘wp_insert_post’ function, you may want to insert posts with assigned IDs for some reason. Yes, you can do it by using $post->import_id. There is also $post->ID parameter to determine ID. I’ll describe difference between $post->import_id and $post->ID of wp_insert_post. If you want to insert a new post with arbitrary ID, use $post->import_id. If you … Continue reading Calling wp_insert_post to create a post with assigned ID in WordPress