Episode 13 • Frontend Tips

WP REST API - Add Posts From Frontend

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 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.

Download code

Wanna ask a question about this video?

Like This Video?

Consider supporting me on Patreon.

...or you can share this video, that also helps ;)

  • Episode 01 • Duration 23:08

    Using Laravel Elixir With WordPress

  • Episode 02 • Duration 16:13

    Introduction To CSS Grids

  • Episode 03 • Duration 24:47

    Introduction to Pattern Lab

  • Episode 04 • Duration 16:56

    Smashing Magazine + Netlify. What's the Big Deal?

  • Episode 05 • Duration 16:34

    CSS Grid Layouts - One Third + Two Thirds

  • Episode 06 • Duration 16:27

    CSS Grid Layouts - grid-template-areas (Medium.com Example)

  • Episode 07 • Duration 23:59

    CSS Grid Layouts - Gridify My Site

  • Episode 08 • Duration 19:37

    Organising JavaScript

  • Episode 09 • Duration 04:41

    One Language Every Programmer Should Know

  • Episode 10 • Duration 13:59

    WP REST API - Custom Endpoints

  • Episode 11 • Duration 08:03

    WP REST API - Custom Post Types And Fields

  • Episode 12 • Duration 19:55

    WP REST API - Custom Filters

  • Episode 13 • Duration 13:09

    WP REST API - Add Posts From Frontend

  • Episode 14 • Duration 32:04

    Let's Checkout... Blitz.js

  • Episode 01 • Duration 23:08

    Using Laravel Elixir With WordPress

  • Episode 02 • Duration 16:13

    Introduction To CSS Grids

  • Episode 03 • Duration 24:47

    Introduction to Pattern Lab

  • Episode 04 • Duration 16:56

    Smashing Magazine + Netlify. What's the Big Deal?

  • Episode 05 • Duration 16:34

    CSS Grid Layouts - One Third + Two Thirds

  • Episode 06 • Duration 16:27

    CSS Grid Layouts - grid-template-areas (Medium.com Example)

  • Episode 07 • Duration 23:59

    CSS Grid Layouts - Gridify My Site

  • Episode 08 • Duration 19:37

    Organising JavaScript

  • Episode 09 • Duration 04:41

    One Language Every Programmer Should Know

  • Episode 10 • Duration 13:59

    WP REST API - Custom Endpoints

  • Episode 11 • Duration 08:03

    WP REST API - Custom Post Types And Fields

  • Episode 12 • Duration 19:55

    WP REST API - Custom Filters

  • Episode 13 • Duration 13:09

    WP REST API - Add Posts From Frontend

  • Episode 14 • Duration 32:04

    Let's Checkout... Blitz.js