Skip to content

Instantly share code, notes, and snippets.

@rorqvist
Last active May 2, 2019 16:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rorqvist/8e3c535851c6456c620d3abe1df08562 to your computer and use it in GitHub Desktop.
Save rorqvist/8e3c535851c6456c620d3abe1df08562 to your computer and use it in GitHub Desktop.
@rorqvist
Copy link
Author

@rorqvist
Copy link
Author

<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