From the course: WordPress: REST API

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Read only: Load next post using REST API

Read only: Load next post using REST API - WordPress Tutorial

From the course: WordPress: REST API

Start my 1-month free trial

Read only: Load next post using REST API

- [Instructor] To give you a practical example of how the REST API can be used within the context of a theme, I've created a child theme and made it available through the exercise files for this movie. You can go grab the folder called TT Child and place it inside the themes folder of your local site and activate the child theme. I'm going to go to the front end. You'll see this is a child theme of 2020. And the major change I made here is inside a single post template. If you go to a single post and scroll down there are no comments here. In place of comments we have this section that says previous post and has a link to the previous post. Click on this link and it loads the previous post directly below the first one. So I've created a bit of an odd user experience but it's for a good reason. This type of functionality to conditionally load something only when the user asks for it is a perfect example of…

Contents