DEV Community

Martial Jefferson
Martial Jefferson

Posted on

Load WordPress Posts in React

In an attempt to show as simple of a React app as possible, we're stealing Chris Coyier's example. 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.

Top comments (0)