Enable SoundCloud oEmbed on your WordPress site

Due to being in a mood involving musician promotion, I’m typing up this quicky tutorial about adding SoundCloud oEmbed support to your site.

Simply add this code snippet it to your theme’s functions.php, a basic quick plugin that you type up as you read this post, or a “Must-Use” plugin.

wp_oembed_add_provider('#https?://(?:api\.)?soundcloud\.com/.*#i', 'http://soundcloud.com/oembed', true);

Once that is added, you can simply paste in SoundCloud based urls into your post and they will automatically embed themselves. You can see an example below, first with the actual url, and then the result.

URL

http://soundcloud.com/haimtime/haim-dont-save-me/s-SGs8F

Result

Resources used

Leave a Reply

Your email address will not be published. Required fields are marked *