Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@rorqvist

This comment has been minimized.

Copy link
Owner Author

commented Nov 27, 2018

@rorqvist

This comment has been minimized.

Copy link
Owner Author

commented Mar 16, 2019

<script src="wpcom.js"> </script> <script> // create a client WPCOM instance var wpcom = WPCOM(); // retrieve a listing of the most recent // 5 posts on "en.blog.wordpress.com" wpcom .site('en.blog.wordpress.com') .postsList({ number: 5 }, function(err, data) { if (err) throw err; console.log('the newest 5 blog post titles are:\n'); data.posts.forEach(function(post, i) { console.log(' %d: "%s"', i+1, post.title); }); }); </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.