Fill custom fields when saving custom post types
You would use “save_post” hook. It will look something like this. add_action( ‘save_post’, ‘populate_empty_place’ ); function populate_empty_place( $post_id ) { //verify post is not a revision if ( !wp_is_post_revision( $post_id ) && get_post_type($post_id) == ‘report’) { // Check for empty place // And popluate with your own value } }