new Vue({
el: ‘#posts’,
data: {
posts: [],
},
mounted() {
fetch(“https://yourWordpressURLhere.com/wp-json/wp/v2/posts?per_page=20&_embed=wp:term,wp:featuredmedia”)
.then(response => response.json())
.then((data => {
this.posts= data;
}))
}
});