WP Audio Gallery Playlist

wordpress 2.6 has a way of associating audio/music with a post, when uploaded in a post (just as images are).  unfortunately there is no way nice, simple way of getting these associated audio files to play in an embeded player.

i’ve come up with my own solution: WP Audio Gallery Player

This plugin uses the flash XSPF player.

free for use, my first contribution to the wordpress open source community.  but i gladly take donations, if you like my solution.  :)

Installation and Use:

  1. install plugins folder “wp-audio-gallery-playist” into “wp-content/plugins/” folder
  2. activate plugin.
  3. add text “[WP AUDIO PLAYLIST]” anywhere in to your post, this will add a player with ALL the songs you’ve uploaded to your post.
  4. -or- simply insert track into your post from “Add Audio”

features and options:

  • for full gallery mode, you can display the album artwork for each track by specifying the URI to the image in the “caption” field of the track’s details.
  • change the order of the tracks by specifying a number in the “order” field of the gallery menu.

Live Demo

Download Here

Copyright (C) 2008 David Thomas Liem

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .

59 responses to “WP Audio Gallery Playlist

  1. Thank you.. i’ll try this :D

  2. Does this work with WP 2.7?

    Any way of making it work with the media library in WP 2.7 (play files attached / uploaded with other posts)?


    • so you would like to be able to insert a song into the playlist from the “Media Library” tab, rather than upload it to the specific post. do i understand you correctly?

  3. I’m confused how exactly one is suppose to upload the files to the post. I click on “Add Audio”, select my file, and click “Insert Into Post” but Ijust get the string of the file name I uploaded.

    Is there another way to upload files to posts?

  4. have you enabled the plugin?

    if so, in the “edit post” section it will only show up as a link. but if you preview post, you will see that the embedded xspf player has replaced the audio.

    if you have more than one song uploaded, and you want to create a playlist with the embedded player just insert “[WP AUDIO PLAYLIST]” into your post and when you preview/publish, you will see the xspf player replace the text with the list of music you have uploaded to the post/page.

  5. A beautiful plugin! is it possible to switch to the slim player?

  6. I am a music composer, so I found this plugin very useful. I use it on my music page so people can listen to my music. However, I also want to let people download the music files too, but whenever I put a link to a music file, it turns into one of the audio players. Is there any way I can turn off the audio player for specific tracks?

  7. Hello Jeremiah,

    Turning off the audio player isn’t yet an option I have added to the plugin. I suppose that is an option that I can add for the plugin.

    I have a few suggestions that you might want to consider:

    1) you can actually download via the XSPF player, by right-clicking and selecting “download this song”
    2) most people like to zip up there mp3s when optioning people to download their music. trying zipping your music files and providing a link that way.

    let me know what you think.

  8. Oh! Great idea. I guess I’ll just let them download by zip files (why didn’t I think of that?). Thank you.

  9. i’m also having problems adding my audio files, when i add a single audio file using ‘add audio’ (from URL) in wordpress it shows up as a simple text link when i preview.

    if i add the [WP AUDIO PLAYLIST] tag i do get the player but it is blank with no audio files attached.

    from what i can see your pulg-in is correctly installed and activated … thanks.

  10. Same problem as described above. Preview and post only shows a text link. Instructions seem a little TOO easy, something is missing.

  11. Block Plugin from automatically inserting XPSF player


    A future improvement would be to add an “if statement” the linked to an option on the option page.

  12. This looks like a great plugin, but what disappoints me about it is the lack of support. Many people, myself included, have tried to install this but we’re not getting the player, we just get some text or a link, no player.

    A simpler, dumbed-down, installation and usage document would be better. Just a suggestion.

  13. I’d suggest having a widget for a plugin like this. Or also just in PHP code. I’d like to place this plugin on my site theme, but can’t because theirs no way. :'(

  14. My problem details:

    in Edit Post (HTML):



    in Edit Post (Visual):
    The Link

    on Preview i can see the small player for the link and the Playlist without tracks….

    If i try to press play, both tell me “undefined”….

    What now ^^?

    i got WP 2.7.1

    • This plugin still needs some work to get it ready for prime-time.

      Here’s how I fixed the “undefined” bug. Do you use a non-default prefix for your wordpress tables? That’ll cause the problem.

      1. Go to the plugins/wp-audio-gallery-playlist directory.
      2. Open up “playlist.php” in your favorite editor.
      3. Under the line “global $wpdb;” add a line:
      $table_name = $wpdb->prefix . “posts” ;
      4. Several lines below, you’ll see an ‘if’ statement with two strings of SQL code. Inside those strings, look for `wp-post` and replace it with `’ . $table_name . ‘` (mind the placement of the back-quotes and the single-quotes)


      • thank you for this! i failed to see that i hardcoded the table name, and I could help anyone because I couldn’t get access to other people’s database. This fix is in for version 0.11!

    • I have submitted a fix for this in version 0.11. please check try it out and let me know if it helps you.

  15. I agree with the last comment. Would love to have this player in my sidebar. Is there a PHP line that would do this easily?

    • there currently is not in version 0.10. but i’m am working on it, for you all. thanks for the suggestion/requests.

  16. I just installed 0.11 with wp 2.8 – working so far with no problems..

    I tried several other plugins and deleted them quickly.

    I am setting up for a musician that wants something simple and easy to use.. This is it.

    The others were overkill!


  17. Pingback: testing music player | life according to Ola Nordal

  18. I’m still having the undefined problem with non-standard table prefixes, even with the most current plug-in version. Too bad – because the player seemed so simple to use and looked so nice, that I wanted to describe it in my WordPress article. But editing php-files is something my readers aren’t able to do ;-)

    • i found that i still hard coded a table prefix into one of the files. i fixed that for version 0.12, are you using 0.11 or 0.12? please let me know.

  19. How can I insert all my music from different posts into ONE playlist?
    I mean to create audio gallery (all songs) on one page.

    How can I connect in player some image with song?

    Thank You!

    • currently there is no support for inserting all music from different posts. i may consider adding this feature if more requests come through.

      connecting an image with a song:
      – for full gallery mode, you can display the album artwork for each track by specifying the URI to the image in the “caption” field of the track’s details.

  20. Is there anyway that I can DISABLE the Download this Song link?

    • There currently isn’t a way to do this. But it has been requested before. I am planning to add this feature in the future.

  21. I found a bug with the plugin. When you have your site in a different directory (WordPress URL is different than the Site URL) then the player doesn’t show up.

    The solution was easy, everywhere in wp-audio-gallery-playlist.php you need to replace:

    get_option(‘home’) to

  22. I am having a weird problem where the album art shows up on my local installation, but not on my live site. If it helps, I am using godaddy hosting. Example is at the bottom of this page: http://theedgemostviolent.com (where is says Record Breakers)

  23. Sorry, I am an idiot, scratch my comment. I fixed it by adding a width value to the settings. However, I was wondering if you could add the Buy button under the album art?

    • There is currently no support for that. But if you download the open source project for XSPF player, one can create that customization easily. I currently don’t have plans to support a feature like that. sorry.

  24. Thanks for you replies! One more question: it there a way to get the player to auto start the first song in the list after the player loads? As you can see in http://theedgemostviolent.com (recork breakers) it would be great to have the player start playing after it’s called with AJAX

  25. Hi,

    I installed have the latest WP version and the latest plugin version .12. I get undefined in the player when I click to play. Any ideas on how I can fix it? Thanks a ton, this looks like what I need.

    Thanks for your help! CJ

  26. Hi. Did the undefined bug ever get fixed?

    The instructions are really simple. But, the trouble-shooting is not in your documentation.


  27. Hello. I downloaded and installed the latest version of this lovely audio player, but seem to have run into the ‘undefined’ issue some people speak about above.

    I did some poking around and noticed that on another site, you had mentioned to a person who was having the same problem to verify what their “$table_prefix = “ was in their wp-config,php file. Does a change need to be made to this prefix in order for the player to work properly in the latest version of WordPress?

    Any help would be greatly appreciated. Thanks!

  28. What’s the best way to include this within particular templates? I want it to appear on all pages with the header, so I’m trying to find the best way to include that.

  29. This looks like exactly what i need … I just can’t seem to get it to work. I downloaded, activated, uploaded 14 tunes, put the code in … and nothing.
    I’m using WP2.8.4, I deactivated plugins and tried (same results) … would love to get this working.

  30. Is there a way to get the player to auto start the first song?

    • There currently isn’t in version 0.12, but this is a good request for a setting in the options menu, or even a local tag option.

  31. I Have A Couple Questions If U Can Please Help,

    1st, I Can’t Get The Image To Show, I Place The Url To Image (http://2new4u.com/Downloads/wp-content/uploads/snoopdogg.jpg) In The “Caption” Field Of Media Info In The Upload,

    2nd Is It At All Possible To Upload The Tracks For The Play List From The Media Library? I Use My FTP And The “Add From Server” PlugIn To Upload My Media.

    Thank You In Advance. Great PlugIn Bye The Way.

    OH…. And 3rd, Can You Change The Look Of The Player, Like Color Or The Width Of The Top Bar?
    Thank You Again.

  32. spiritual2postive

    i am having problems with this plugin. i upload songs through the add audio from my media library. i add the code [WP AUDIO PLAYLIST].
    i look at the post and i have the songs i added and an empty audio plyer. how do i get the songs into the player

  33. spiritual2postive

    i tried downloading form the link. it didn’t work. i tried to hit play on the music player i got undefined. what’s next :)

  34. I Asked A Few Questions The Other Day But Don’t Believe I Got A Response,
    How To Add Cover Art?
    Can U Add Playlist From Media Library?
    Please Give Me Some Assistance,
    Thank You>>>

  35. OK Sorry, I Got The Album Art To Show, So Ignore That Part Of My Question, Still Wondering About Adding Media From Media Library Instead Of Directly To Post, Plus I Would Like To Inquire About An Auto Start Feature. Thank You Again

  36. How do i remove the ‘shiny’ gradient from the playlist area of the skin? If i could remove that (or control it ) this plugin would be perfect! Thanks for all your hard work.

  37. how about displaying the player outside the loop ?

    any ideas ??


  38. [french, so excuse my mistakes]

    I want to use your plug-in in my metal band website. I want to integrate the player in a fine design. I’ve two problems :

    I can’t modify the dimensions : when I try, I get the error :
    Not Found

    The requested URL /wordpress/wp-admin/&updated=true was not found on this server.

    My second trouble : can I, and how, customize colors ?

    thank a lot for your hard work,


  39. I’d really like to be able to re-use a mediagallery in a new post. It doesn’t make sense to upload the media files twice! I hope you can adjust your otherwise fabulous plugin.

  40. Can the playlist feature automatically play tracks once the page is loaded? If so, how? please advise. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s