Updating posts: wp_insert_post vs wp_update_post

Both wp_insert_post and wp_update_post functions can be used to update posts. However, they behave slightly different when dealing with published posts. wp_update_post just updates post data while wp_insert_post also put updated post in front of the list.

Be aware

Advertisements