Enable SoundCloud oEmbed on your WordPress site

⏲️ Time: < 1 min

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


Michael is a seasoned developer who loves helping build stuff for the internet. He brings over a decade of varied experiences working with both front and back end developer stacks.

His primary focus has been WordPress and PHP and all the components that go along with them. During the day, he is a Support Engineer with WebDevStudios, helping clients get the best that they can out of their own websites.

Categories: Web Development

Leave a Reply

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