WordPress as a micro front end service on an HTML site.

Using the WP Rest API and Web Components to deploy content and functionality with just two lines of code!

Each of these pages uses custom HTML tags to render content and functionality from a WP site hosted on another domain. Use VIEW SOURCE to see how highly functionaly components can be used with just two lines of code.

<show-post id="106"></show-post>

<script src="showPost.js"></script>

The navigation bar and back-to-top feature (on other pages) are also Web Components.


This returns one post based on a JSON file for one post.

We are using CSS custom properties defined in ../_css/library.css

In DEV > ELEMENTS we can change postid to 106 or 109 to get a new post.