SoundCloud Audio Player for WordPress

By September 13, 2016Knowledge Base

WordPress.com and SoundCloud provide an easy-to-use embed tool that makes it simple to share music from SoundCloud to your blog. Users can upload their own music/demos (or any shareable track) to SoundCloud, and then embed a SoundCloud music player on their sites. SoundCloud supports the uploading of AIFF, WAVE, FLAC, OGG, MP2, MP3, AAC, AMR, and WMA files.

Once you have located a song to embed (via search or Explore), look for the “Share” button.

Soundcloud list song to embed (via search or Explore)

Soundcloud list song to embed (via search or Explore)

 

Soundcloud song detail

Soundcloud song detail

 

You will then see an overlay appear, and must click on the ‘Embed‘ tab in order to preview the embeddable player. You can choose between two formats for embedding the track.  The first format mimics a square album cover, while the second is a rectangular shape that features user comments and a smaller version of the album artwork. Click the box next to ‘WordPress code‘ to get the appropriate embed code:

Soundcloud embed share option

Soundcloud embed share option

 

And this is result:

Style 1:

 

Style 2:

[soundcloud url=”https://api.soundcloud.com/tracks/168480167″ params=”color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false” width=”100%” height=”166″ iframe=”true” /]

 

NOTE: If the soundcloud shortcode don’t work on your site you only need past this code to your theme’s functions.php file:

// Add SoundCloud oEmbed
function add_oembed_soundcloud(){
wp_oembed_add_provider( 'http://soundcloud.com/*', 'http://soundcloud.com/oembed' );
}
add_action('init','add_oembed_soundcloud');

That’s it. Simply paste your SoundCloud URL in a separate line and let the auto-embedding (oEmbed) magic do the rest.