Gekiyaku Gekiyaku -4 years ago 67
PHP Question

In wordpress, is there a way to add posts as drafts from the main site, not the admin panel?

Have to make something so anybody can add something in the form on the public site, then admin in admin panel will publish it. The post will be a custom type with custom fields and post thumbnail.
So like in a title. Is there a way to make it happen in WordPress?

Found function

*wp_insert_post*
but how to make it work for nonregistered users, also how to upload a picture and add it to post?

Answer Source

Ok, I found the way to do that. Simply use 'Contact Form 7' and plugin 'Post My CF7 Form', create frontend form in CF7 and map it to custom post type. Needed to do some changes in code but works like charm.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download