DEV Community

Discussion on: Headless WordPress with React

Collapse
 
michaellsmith profile image
Michael Laurence Smith

Great tutorial. I didn't realise you could still use the admin of WP. How would you continue this app to be able to create movies from the React front end? I'm trying to convert one of personal projects from using localStorage to using a WP-API backend. I realised how complex WP-API data structure is. How do you create a custom post type structure on the front-end before making a POST request?

Collapse
 
jchiatt profile image
J.C. Hiatt

Hi Michael! To my knowledge, you'll have to have the custom post type registered before you can post to it from the frontend. I'd have to look into it deeper to figure out if there's a way to register a CPT from the frontend (although that may not be a good idea in terms of security).

I'll be creating new articles / videos soon, including more about POST requests! Be on the lookout on my Twitter: @jchiatt .

Cheers!
—J