I’ve never really been happy with any of the ‘now playing’-style plugins for So this weekend, I threw something together myself; something easier than a plugin. Now, I’ll show you how to get a simple, auto-refresh album cover in the sidebar, just like the one on this site. All you need is a small .js file (tiny!) and a standard WordPress text widget. Let’s get started.

. . .

Save the following block to a lastfm.js file and put it somewhere on your webserver. This isn’t a plugin, so it doesn’t need to live anywhere special. Open the file with your favorite editor and enter a user name, api key, and a path for a placeholder (in case the API doesn’t return an image). (more…)