Use Audio Player WordPress Plugin outside WordPress Blogs

I figured this out yesterday, and it is the sort of thing a lot of people would like to do and haven’t figured out yet.

First off, this is the audio player:
and you can read up on it at the AudioPlayer website. It’s very easy to integrate in WordPress, and putting a player in a post looks like this:


Second off, my ‘easy’ way to integrate it outside WordPress:
0. Make sure you can use PHP with your web server. This is pretty standard anymore; you’d probably have to install your own build of Apache to avoid having PHP.

1. First put this php function in a file. My version is here:

function audioplayer($audioURL,$playerIndex )
echo "<script language=\"JavaScript\"
<object type=\"application/x-shockwave-flash\"
id=\"audioplayer1\" height=\"24\" width=\"150\">
<param name=\"movie\" value=\"http://YOURPATH/player.swf\">
<param name=\"FlashVars\"
<param name=\"quality\" value=\"high\">
<param name=\"menu\" value=\"false\">
<param name=\"wmode\" value=\"transparent\">

2. You will need two files to make the player work: audio-player.js, and player.swf. In a WordPress install these will be in wp-content/plugins/audio-player/assets. Copy these someplace in your web directory — maybe the same place you put audioplayer.php. Then replace YOURPATH with the URL for that directory.

3. To use the audioplayer PHP function in an html page:

<?php include("http://YOURPATH/audioplayer.php"); ?>
<?php audioplayer("YourMP3URL",1); ?>

There you have it. Now I realize, not everyone writes their own web pages and most of the above might be pretty forbidding, but I hope that if you can write a simple web page and manage the files in your public_html, this is enough information to get you going.

2 Replies to “Use Audio Player WordPress Plugin outside WordPress Blogs”

    1. The quickest way to annoy the living crap out of people is to start playing music as soon as they get to a site.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.