From the course: WordPress: REST API
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Read only: Load next post using REST API - WordPress Tutorial
From the course: WordPress: REST API
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Four practical examples1m 24s
-
(Locked)
Read only: Load next post using REST API8m 23s
-
(Locked)
Cookie authentication: Front-end editing6m 21s
-
(Locked)
Basic standalone app7m 22s
-
(Locked)
JWT authentication: Third-party editing7m 13s
-
(Locked)
Challenge: Add dynamic related posts navigation4m 32s
-
(Locked)
Solution: Add dynamic related posts navigation5m 7s
-
(Locked)
-