How can I change the publish date based on a custom field?
I don’t know how your front end form saves its data, but presumably it is using wp_insert_post and wp_update_post. If so, there is a filter called wp_insert_post_data that can be used to alter the post data before the post is inserted or updated. function reset_post_date_wpse_100021($data,$postarr) { var_dump($data,$postarr); die; //debug // your code return $data; } … Read more