wp_insert_post not inserting post
I recommend changing the form tag to: This will ensure that the form submits to the same page it is on. Also post_title and post_content are required, so the insert will fail if either of those values are blank or missing. (https://developer.wordpress.org/reference/functions/wp_insert_post/)