Create entry in custom post type in wordpress with custom html form


Staff member
I have an html form and I want to save the submitted form data to
custom post type and also send an e-mail, I want all the submitted form fields to be picked up automatically instead of manually adding it in the code as fields change in many different forms.

I do not want to use any plugin as all the forms are very complicated and I contains unique field types.