I have created an ‘event’ custom post type and now I want to create a page that will allow users to create a custom post type from the front-end. Is there a standard way of doing this? I could create a template and then link it to a page that I create manually in the wordpress backend, but I would rather do it programatically if possible. Any suggestions?
2 comments
Comments are closed.
So you want to allow people to create posts from the front-end? Sure…
In this answer here I explain a very basic way in which you can achieve this very thing, front-end posts to a post type of your choice.
Here is a basic example of what you might include in your template file to do so;
(please see original answer for further details)
This example is void of any error checking, validation and sanitization. This just exemplifies how to take form data and store it into a post type.
I’ve done a handful of projects that utilize something like this, and here’s my preferred solution: