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?
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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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?
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