This is a repost of a question asked on stackoverflow, and was referred to this site:
My client wants to create a form on his new WP site that when filled out and submitted will be submitted to his admin post queue to approve and if he approves gets posted on his site in the “blog” (which is actually a bunch of guitar like tabs). The form would be custom and have custom fields. Below is the form, but in the old design before I did a refresh on it.
So, how hard would this be? He does not want it in the WP admin panel which i began to do, but outside in a page like /contribute
you can use plugins fro the front-end posting:
Or you can create the form yourself
and process it
And make sure to check for nonce and sanitization of the form fields.
UPDATE
According to your gist code and comment change your function to this:
I haven’t checked it out, but this plugin probably shows you how to approach it. Here is another one, or you could create a special user called ‘anonymous’ and give them ‘author’ permissions. You probably want to be careful about giving them edit or delete permissions.