Episode 15 • Theming With WP REST API

Add Image To Post Type

In this episode of theming with WordPress REST API and Vue.js we are going to add URL to featured image of our custom post type to our REST API.

To add featured image to our WP REST API we are going to be using register_rest_field function that we used in previous episode. Because as you will see, you can get pretty much any data from WordPress to your REST API by using that function.

Code used in this video

Download it here

  • Episode 01 • Duration 16:46

    Setup

  • Episode 02 • Duration 20:54

    Listing Posts

  • Episode 03 • Duration 12:54

    Add Images To API

  • Episode 04 • Duration 05:27

    Display Categories

  • Episode 05 • Duration 05:36

    Filter Posts By Title

  • Episode 06 • Duration 09:57

    Filter By Category

  • Episode 07 • Duration 14:09

    Making Filters Pretty

  • Episode 08 • Duration 09:03

    Getting Post Preview

  • Episode 09 • Duration 08:51

    Previous / Next Post

  • Episode 10 • Duration 06:58

    Making Previews Pretty

  • Episode 11 • Duration 08:28

    Getting Full Post

  • Episode 12 • Duration 06:53

    Wrapping Up Full Post

  • Episode 13 • Duration 07:06

    Custom Post Types

  • Episode 14 • Duration 09:17

    Adding Custom Fields

  • Episode 15 • Duration 05:06

    Add Image To Post Type

  • Episode 16 • Duration 19:03

    Simple Pagination

  • Episode 17 • Duration 05:10

    Loading Screens

  • Episode 01 • Duration 16:46

    Setup

  • Episode 02 • Duration 20:54

    Listing Posts

  • Episode 03 • Duration 12:54

    Add Images To API

  • Episode 04 • Duration 05:27

    Display Categories

  • Episode 05 • Duration 05:36

    Filter Posts By Title

  • Episode 06 • Duration 09:57

    Filter By Category

  • Episode 07 • Duration 14:09

    Making Filters Pretty

  • Episode 08 • Duration 09:03

    Getting Post Preview

  • Episode 09 • Duration 08:51

    Previous / Next Post

  • Episode 10 • Duration 06:58

    Making Previews Pretty

  • Episode 11 • Duration 08:28

    Getting Full Post

  • Episode 12 • Duration 06:53

    Wrapping Up Full Post

  • Episode 13 • Duration 07:06

    Custom Post Types

  • Episode 14 • Duration 09:17

    Adding Custom Fields

  • Episode 15 • Duration 05:06

    Add Image To Post Type

  • Episode 16 • Duration 19:03

    Simple Pagination

  • Episode 17 • Duration 05:10

    Loading Screens