Latest Post Status Posts
In an attempt to show as simple of a React app as possible, I am stealing Chris Coyier's example that shows CodePen jobs. I wanted to show an example using WordPress post data.
If you fork this Pen, you can swap out the URL from Post Status to your own website, if it's running v2 of the WordPress REST API .
The author and featured image data is made available thanks to the
?_embed
query string, which adds additional information to the return data: author, media, terms, and comments are all included, for example.
The query for the following posts looks like this:
https://poststatus.com/wp-json/wp/v2/posts/?_embed&per_page=3&author=1
To see something similar with Vue.js, check out this Pen .