GridVids
Sign in with YouTube

WP REST API - Add Posts From Frontend

Mark watched
Don't Miss
Hide
Open in popup Open on YouTube

Watch and Learn 6 years ago

In this episode we are going to be using #WordPress #REST API to add some new posts to our database with vanilla #JavaScript.

As you will see this is very similar to what we did in this(https://www.youtube.com/watch?v=WSOwvyNArOA) Next.js and Strapi series episode. This is because we used #JWT authentication in both cases. So we will firstly authenticate ourselves to the WordPress installation using JWT, and then we will add some data to our posts with the token provided from JWT. This a super easy way to add authentication and allow your users to create content from the frontend of your site.

### Code used in this video

https://bit.ly/2HADltN

### You can support my work on Patreon

https://patreon.com/watchlearn

### Follow me on Social Media

Github: https://github.com/ivandoric Twitter: https://twitter.com/ivan_doric Instagram: https://www.instagram.com/watchlearntuts Facebook: https://facebook.com/watchlearntutorials