wp-iTunes
I bring to you my first WordPress plugin: iTunes Playlist Plugin for Wordpress 2.0
About the iTunes Playlist Plugin
This plugin has a code base that is based on the iTunes XML Playlist Reader originally authored by Richard James Kendall. He’s the brains that came up with the parsing algorithm for that big honking XML file that iTunes generates.
I got the idea for implementing it from using the SimpleTags plugin (thank you, Ivan). I used his algorithm to find the playlist tags.
So, basically, I took two works and hacked them together to make this little plugin. I hope you honor the source authors for their time and effort, and I hope you find that this plugin is useful to you.
Installing the Plugin
The download has a single .php file that you’ll install in your ~/wordpress_root/wp_content/plugins/ directory, and then activate it in your WordPress admin system.
The way it works is very simple. You’ll configure the itunes-playlist.php file (currently inconveniently located in line 29) where you’ll set the absolute path (or URL in case your server allows cross-domain fopen() ) to
$playlist_url = "your_relative_path_from_wordpress_root/to/iTunes_export_files/";
This path should be where you’ll be uploading your export files on a regular basis.
Using the Plugin
Once this plugin is activated, using it is really simple. Just upload your playlist export file in XML format right from iTunes into the appropriate directory.
At the bottom of a post where you want to reference the playlist, all you need to add is a <_playlist_>your_playlist.xml<_/playlist_> and you’ll be money.
Known Issues
- This seems to only supports playlists as the last item on the page.
- More than one playlist per page defaults to the last one in.
I’ve been pretty lax about acting on feedback in the past (sorry folks). If you find other issues and/or find solutions to issues posted here, I’ll be happy to incorporate changes or suggestions. If you’re throwing ideas at me without the model to implement them… well, just remember that this plugin doesn’t exactly pay the rent
Here’s a test, using a deliberately (note I mentioned deliberately) crappy playlist entitled Inspirational Cheese:
InspirationalCheese.xml
Please direct any comments or questions to aaron(dot)silvers(at)gmail(dot)com, or just comment below!


