There are 3 things to accomplish this:
- If you’re not already using the jquery library, you need to include it in your theme.
- Insert an html ul tag where you want the posts to render.
- Add the jQuery code to your theme.
Some themes already come with jquery and therefore there’s no need to add it again. However the library needs to appear before the jQuery code for it to work. Check for the word jquery in your theme’s html and if you can’t find any instances of it, then add it in the head section, that is within these tags <head></head>. Then right after it, place the jQuery code. So you will have the following:
Replace staff.tumblr.com with the hostname of your blog and if you want to change how many posts are displayed, then change the number 5 at the end of the url eg http://staff.tumblr.com/api/read?start=0&num=20. The latter will retrieve the last 20 blog posts.
Now you need to include the following somewhere in your theme where you want the posts to be displayed:
<ul id="recent-posts"> </ul>
You might want to place that in the sidebar so that it’s prominent. And that’s it really.
Any problems, let me know 🙂