Can you show your code for the front-end form? If you’re creating a new post, post_id
will actually be a string of ‘new_post’ and will always fail the first few conditionals. Additionally, it could pick up the global $post of the page that the form is on which may not align with what you’re trying to do.