Compact WordPress Audio/Music Player Plugin (All Browser Compatible)

The WordPress Audio Player plugin is a compact HTML5 + flash hybrid  based WordPress plugin which can be used to play an audio file (.mp3 or .ogg). The audio player is compatible with all major browsers and devices (Android, iPhone).

  • If you are selling audio files from your site then you can use this plugin to offer a preview
  • If you do podcasting then this audio player can be used to embed the audio files on WordPress posts or pages
  • The audio player is compact so it doesn’t take a lot of real estate on your webpage
  • HTML5 compatible so the audio files embedded with this plugin will play on iOS devices

Audio Player Plugin Screenshot

The following images show how the audio player looks when it is playing and not playing a music file:

The following is a preview of how the audio player looks when using template 1:


When the play button is clicked, the button will change to a pause button allowing users to pause the music playback.

Audio Player Plugin Installation and Usage

  1. Go to the ‘Add New’ plugins screen in your WordPress admin area
  2. Click the ‘upload’ tab
  3. Browse for the plugin file (
  4. Click ‘Install Now’ and then activate the plugin
  5. Use the following shortcode to embed an audio file anywhere on your site

[sc_embed_player fileurl="URL OF THE MP3 FILE"]

Example shortcode:

[sc_embed_player fileurl=""]

Additional Usage Documentation

Using Auto Play Option

Use the “autoplay” parameter in the shortcode to play the audio file on page load. Here is an example shortcode with autoplay option:

[sc_embed_player autoplay=true fileurl=""]

Specifying a Volume Level

Use the optional “volume” parameter in the shortcode to specify a volume level for the audio. You can use a value between 0 – 100 for the volume level. Here is an example shortcode usage:

[sc_embed_player volume="50" fileurl=""]

The above will set the volume level of the audio file to 50.

Looping the Sound

Use the “loops” parameter in the audio player shortcode to loop an audio file playback automatically. Here is an example shortcode usage with auto loop:

[sc_embed_player loops="true" fileurl=""]

Specifying Both MP3 and OGG Files for the Audio

Note: You don’t really need to use this option. You can just use the mp3 option and the plugin will make sure that the file is playable in all devices.

You can specify both the files types in the “fileurl” parameter separating them with a “|” character. Here is an example shortcode usage that is specifying both the .mp3 and .ogg version of the audio file:

[sc_embed_player loops="true" fileurl="|"]

The plugin will play the supported file based on the user’s device.

Wrapping Text Around the Audio Player

If you want to wrap some text around the audio player then use the following in the “Text” view of the post/page editor:

<p style="display: inline">My Audio: </p>[sc_embed_player fileurl=""]

Alternatively, use the following in the “Text” view of the post/page editor (wrap the audio player shortcode in another CSS class with float):

Some example text
<div style="float: left;">
[sc_embed_player fileurl=""]

Audio Player Template 1

A few users have asked us to add a player template that has a seek bar and volume control. Audio player template1 gives you that option:

Use the following shortcode to embed the audio player using template 1:

[sc_embed_player_template1 fileurl=""]

The above shortcode will produce an output like the following preview:


This template1 shortcode supports “autoplay” and “loops” parameters too. Here is an example:

[sc_embed_player_template1 fileurl="" autoplay="true" loops="true"]

Misc Tips and Tweaks

Remove the White Pixel/Dot on Black Background

If you are using a WordPress theme with black background then you may notice a very small white dot below the audio player. Add the following block of CSS code to your theme’s CSS file to get rid of it:

bottom: 0px;

Adding the Audio Player to a Theme’s Template File

You can also embed the audio player in your theme’s template file. Here is an example code that you can add to your template file:

<?php echo do_shortcode('[sc_embed_player fileurl="URL OF THE MP3 FILE"]'); ?>

Playing Audio on Your Home Page Only

Here is an example code that you can add to your header.php or footer.php template file and it will autoplay the audio file on your home page only:

    echo do_shortcode('[sc_embed_player fileurl="URL OF THE MP3 FILE" autoplay="true"]'); 

Change the Player Background Color for Template 1

Add the following CSS code to your theme’s CSS file or via the custom CSS plugin to change the player background color. The following example will change the color to red.

.mejs-container, .mejs-embed, .mejs-embed body, .mejs-container .mejs-controls {
    background: red !important;

Disable Simultaneous Audio File Playback

Go to the settings menu of this plugin and check the “Disable Simultaneous Play” option to turn off simultaneous audio file playback option. When this option is used, it will automatically stop the audio file that is currently playing when the visitor plays a new file.

Autoplay is not Working on IOS Devices

IOS devices (iPhone iPad) do not allow you to do autoplay. This is a functionality that Apple prevents on their devices. Nothing we can do in the plugin for this unfortunately.

Hosting Your Audio Files

The most obvious choice is to upload your audio files to your site using WordPress’s media uploader. After you upload the audio file via media uploader, it will give you the URL of the file. You can then use the URL in the shortcode of this audio player plugin.

Alternatively, you can host your audio files on Amazon s3.

Download The Latest Version

Plugin Compatibility

Works with the latest version of WordPress.

Plugin Requires

Requires WordPress 3.0 or higher.

Check out our projects page for more cool WordPress plugins.

Found this article interesting? Subscribe to Tips and Tricks HQ

email icon rss feed icon twitter icon google plus icon

Comments (107 responses)

  1. admin says:

    @Michael, There should be no issue with that file.

  2. Michael says:

    Good day,
    I’ve been using m4a files with your plugin and they seem to be working fine. Is there any disadvantage to doing this?

  3. admin says:

    @Lee, Look under the main Settings menu of your WordPress admin dashboard. There will be one for the audio player there.

  4. Lee Crawford says:

    Great plugin! Just discovered it. I can’t seem to find the Settings menu though. You refer to it to disable simultaneous playback, but I can’t find Settings anywhere. Help?

  5. admin says:

    @Hanazair, Thank you. I have updated the documentation.

  6. Hanazair says:

    If you are trying to play the music on homepage only that is NOT a blog-post you need to use ‘is_front_page() ‘ rather than ‘is_home()’ . See

    Note to Developer – could you update the instructions with this addition?

  7. admin says:

    @Pablo, Read the “Adding the Audio Player to a Theme’s Template File” section from this page. Then edit your header.php file (I am guessing that is the file for your theme header) and use the suggested code in there.

  8. Pablo says:

    Hi dear friends. Its a great player. I just want to know how to insert the code in the header of my theme. I’m sorry my knowlegde of web programing are basic… Thanks

  9. Wylde says:

    Thanks! This is nice and clean. Just how I like it!

  10. admin says:

    @Jeff, There is no way to do the continuous play at this stage.

  11. Jeff says:

    Regarding your answer below to @Jo: “You can make it autoplay but when the user browse to a new page, the song will start again”

    Is there any possible way to have the song that autoplays on the homepage continue to play as the user browses the site?

    Great plugin, thanks!

  12. admin says:

    @KPCTA, No, the plugin won’t be able to remember that you paused it in one page.

  13. Larry says:

    Thank you for your help! Your plugin in working like a charm. I have 51 instances of it on one page and all is working great!

  14. KPCTA says:

    Great plugin. I use it on couple of sites, but I have one question: Is it possible, if I put player on widget and set it to autoplay, and click stop button it stay paused on every other page/post.

    Thank you in advance

  15. admin says:
  16. Larry says:

    Thanks for this great plugin! I did change the graphics successfully, but have an issue: I have lots of audio files on one page and need to make the play and pause images smaller than the supplied 32×32. I did that, but there is still a 32×32 area around them that gets gray when hovering over them, and this is limiting how close I can put them together. I wanted to make them about 12 pixels high. Any way to do that?

  17. Web Eminence says:

    Nice plugin. Thanks. I had a problem using it on a local installation. When I put multiple players on the same page, it always plays the first audio file no matter which button I press. It only does this for me on the local installation but when I put it on my hosting server, it works fine. Not sure why this is but thought I would pass this along.

  18. peethambaran says:

    Work perfect. great plugin. Thanks

  19. admin says:

    @Jo, I don’t have one ready for that. If you can provide an image, I can add it to the plugin as an option.

  20. Jo says:

    Is it possible to provide us a round play button with a better resolution ? For retina devices like iPad Air, Chromebook etc… ?

  21. admin says:

    @Nils, yeah you can use a custom play button image. Take a look at my earlier reply.

  22. Nils says:

    Is there a way to change the play button to a custom play button?

    Thanks for a great plug!

  23. admin says:

    Use filezilla to connect to your server then browse to this plugins folder:


  24. James says:

    Where is the image folder of this plugin? I don’t know where to look. I want to find the play button and enlarge it.

  25. admin says:

    @J, Those buttons are actually images. So look in the images folder of this plugin and replace them with your custom image.

  26. J says:

    Thanks for this great plugin, beautifully simple.
    One question though: Is it possible to change the colour of the player and the play/pause sign to match the styling of my website?

  27. Mario Bruneau says:

    Hey guys, long time since I’ve been here.
    This little audio plugin of yours is simply great like ALL your other products.
    Mario Bruneau

  28. admin says:

    @LotusZen, Check the documentation above to learn how to loop the sound track. You can make it autoplay but when the user browse to a new page, the song will start again (so I don’t think this one will do what you are after).

  29. LotusZen says:

    How can I get this plugin to loop the song I am playing? And which file should I add the shortcode to if I want the song to play continuously across the site background? Footer.php? Thank you for your advise – great plugin!

  30. Sean says:

    Works LIKE a CHARM!!

  31. admin says:

    @Arnab, What code are you using to add the player to your footer.php file?

  32. Arnab Majumdar says:


    Great audio player, runs perfectly when it’s embedded in a page, post or widget. However, it’s not working in either of the header and footer files.

    Not to sound like a complete noob, but when you say “You can also embed the audio player in your theme’s template file”, what is the name of the file that I’m supposed to be embedding it into? Like I mentioned above, header.php and footer.php don’t seem to be working for me…

  33. admin says:

    @Steve, I am pretty sure this theme has some javascript errors which is causing this issue. Switch to the default WordPress theme as a test and then check if the audio player can play the file correctly or not.

  34. Steve says:

    Hi, thanks for the quick reply – copied and pasted that link into address bar – plays fine – I am wondering if it maybe has something to do with the theme I am using – do you know if anyone has used it on a Parallax theme (the reason I ask is that this is on a ‘Page Section’ rather than on the ‘Page’ which is the usual place on a wordpress theme ?

  35. admin says:

    @Steve, Yeah it works on a local host testing environment too. I would double check the URL… if you enter the URL of the audio file in the browser’s address bar, does it play the song or download the file?

  36. Steve says:

    Nice and compact thanks :) – just wondering if the mp3 should be playing on a local testing environment ? I have installed the plugin and put the shortcode in as per instructions – clicking on play is looking normal – but no audio – I have tried presetting volume to 100% – still nothing – checked the url – looks right – any ideas ?

  37. admin says:

    @Jagrav, No it takes one file per player.

  38. Jagrav says:

    Can we add multiple mp3s files to one player?

  39. admin says:

    @James, It uses two images for the play and pause buttons. You can replace those images with the ones you want to use. So try overwriting the current play and pause button images with your your ones in the “images” directory of this plugin.

  40. James says:

    Thanks for your great plug in! I have a request please. Can you add a parameter for the shortcode that enables one to change the colour of the player (and play/pause button) to blend in better with a given website colour scheme? Thanks again.

  41. Pepito says:

    WOW I love it!!!! 😀 😀

  42. admin says:

    @Sylvia, If you can share the URL of the page where this issue is happening then I will take a look at it.

  43. Sylvia says:

    Hi and congrats for your great work. I am using the plugin to add sound samples to the songs in the repertoire of my Gospel Choir’s webpage (which is currently under construction). Not all the songs I list have their own sound sample, and I noticed that the player adds an extra space below and makes the following line shift down, resulting in uneven spaces between the items in my unordered list. I tried to find the way to change this in the css but couldn’t figure it out. I hope I described the problem clearly enough.. Any help? Thank you!

  44. admin says:

    @ashlyn, Have you uploaded an mp3 file to your site using the WordPress’s media uploader?

  45. ashlyn says:


    I am having a hard time adding music to my blog site. Starting with getting an accurate mp3 file url link, do you have any suggestions as to where?

    And trying to find a place on my blogsite to add the auto player. Under which section?


  46. admin says:

    @Krystal, You can use all the shortcode parameters together in one shortcode. Here is an example:

    [sc_embed_player autoplay="true" volume="50" fileurl="url-of-your-audio-file.mp3"]

  47. Krystal says:

    What would the code look like if i wanted it to autostart AND lower the volume?

  48. admin says:

    @Joe, It will use flash in Firefox browser. HTML5 is for browsers that don’t support flash (on those browsers it falls back to HTML5).

  49. Joe says:

    Hi guys, in firefox if you have flash blocked it throws the missing swf error, but i thought it was html5 too right? so it shouldn’t need flash?

  50. admin says:

    @Rob, If the widget (where you embedded the audio player) is being displayed on every page then the player will keep playing on every page. If you only want it on your homepage then add the audio player in your homepage only (some themes have widgets for home page only). Or check the example in the “Playing Audio on Your Home Page Only” section above.

Speak Your Mind