Update: this widget uses an XML-feed from Last.fm that doesn’t update regularly. I have written a new widget: Run for cover. It uses a page at Last.fm that updates every week. More information here.

Turned my bit of PHP for displaying cd covers into a widget for WordPress. It reads the top-albums feed for a last.fm username and displays the covers for the cds.

  1. Download version 1.3 Go here for my new last.fm covers widget.
  2. Extract, drop lastfmcovers.php in /wp-content/plugins/widgets and configure it under the “sidebar widgets” tab in WordPress.

Settings include:

  • title: displayed at the top of the widget
  • username: last.fm username to display cd covers for (no password needed)
  • max displayed: number of images to display
  • description for count: text used in alt/title-tag of the images, % will be replaced with ‘count’
  • image size: pixels for image width and height. Set this to zero to use img.lastfmimage in your stylesheet

What it needs:

  • check if username exists
  • sample stylesheet code
  • suggestions

Update: last.fm changed their “no_album” image, so if you see little grey circles in your sidebar, please install the current version — version 1.3 is now really 1.3.00001.


Submit a Comment