{"id":374381,"date":"2022-11-01T05:57:22","date_gmt":"2022-11-01T12:57:22","guid":{"rendered":"https:\/\/css-tricks.com\/?p=374381"},"modified":"2022-12-12T09:08:06","modified_gmt":"2022-12-12T17:08:06","slug":"rendering-external-api-data-in-wordpress-blocks-on-the-back-end","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/rendering-external-api-data-in-wordpress-blocks-on-the-back-end\/","title":{"rendered":"Rendering External API Data in WordPress Blocks on the Back End"},"content":{"rendered":"\n

This is a continuation of my last article about “Rendering External API Data in WordPress Blocks on the Front End”<\/a>. In that last one, we learned how to take an external API and integrate it with a block that renders the fetched data on the front end of a WordPress site.<\/p>\n\n\n\n

The thing is, we accomplished this in a way that prevents us from seeing the data in the WordPress Block Editor. In other words, we can insert the block on a page but we get no preview of it. We only get to see the block when it’s published.<\/p>\n\n\n\n

Let’s revisit the example block plugin we made in the last article. Only this time, we’re going to make use of the JavaScript and React ecosystem of WordPress to fetch and render that data in the back-end Block Editor as well.<\/p>\n\n\n\n\n\n\n\n

Working With External APIs in WordPress Blocks<\/h4>\n\n\n