How to Embed SoundCloud in your WordPress Posts by using oEmbed

One among our customers requested us for a straightforward option to embed SoundCloud of their WordPress web site. WordPress has this cool function referred to as oEmbed which helps auto-embedding so long as you publish the URL in its personal line. At the moment the WordPress oEmbed library helps widespread providers like Youtube, Twitter, Vimeo, and so forth. Nevertheless, SoundCloud will not be supported by WordPress simply but. Properly there may be nothing to fret as a result of WordPress makes it very easy so as to add oEmbed suppliers utilizing wp_oembed_add_provider() operate. On this article, we’ll present you find out how to add oEmbed assist for SoundCloud in WordPress.

Replace: You DO NOT have to make use of this tutorial anymore. WordPress 3.5+ has built-in oEmbed assist for SoundCloud.

All you need to do is paste the next code in your theme’s features.php file or in a site-specific plugin.

1
2
3
4
5
// Add SoundCloud oEmbed
operate add_oembed_soundcloud(){
wp_oembed_add_provider( 'http://soundcloud.com/*', 'http://soundcloud.com/oembed' );
}
add_action('init','add_oembed_soundcloud');

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

You May Also Like : How to Display Popular Posts by Views in WordPress without a Plugin

There’s a pretty widespread plugin that you need to use as nicely referred to as SoundCloud is Gold which gives plenty of options. Alternatively as a result of SoundCloud is formally supported by WordPress.com, there’s a shortcode obtainable for all WordPress.com customers. So you need to use the JetPack plugin for self-hosted WordPress and allow shortcode embeds possibility. When you try this, it is possible for you to to make use of the shortcode like this:

[soundcloud url=”http://api.soundcloud.com/tracks/207988″ iframe=”true” /]

Hopefully it will assist anybody who’s in search of a option to embed SoundCloud in WordPress.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.

1 thought on “How to Embed SoundCloud in your WordPress Posts by using oEmbed”

  1. Pingback: How We Increased Our Organic Search Traffic By Using HitTail

Leave a Comment

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