Slide 28
Slide 28 text
Recap
1. Created our Underscore JS template with an id of
#post-tmpl to handle the display of a single Post
(index.php)
2. Filled-in the logic in our viewPost callback to send a
GET request to the WP REST API Posts endpoint with
query params for the Post slug and embedding
related data. We pass the response data to our
#post-tmpl Underscore template (main.js)
3. Added the presentation logic to our #post-tmpl
Underscore JS template that displays the featured
image, title, author avatar, author name, and content
for the Post (index.php)