Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The soundcloud short code does not seem to be working. I've tried over several days and it just shows up as raw code. Is this a glitch, has support officially been discontinued, is there some workaround?

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

https://soundcloud.com/radhanath-swami/offer-the-best-you-have

Using the latest wordpress 3.9.1

share|improve this question
    
Are you talking about wordpress.COM or a self-hosted version from wordpress.ORG ? Also - have you tried not using this api.soundlcoud.com URL but soundcloud.com/radhanath-swami/offer-the-best-you-have ? –  kraftner Jun 5 at 13:38
    
Not on wordpress.com but for a domain which i am still testing on my localhost. I pasted the embed code from soundcloud in a post –  Santhosh Yedidi Jun 5 at 14:03

4 Answers 4

Self-hosted WordPress core code simply doesn't have such shortcode. It's extra addition at wordpress com service.

While oembeds (using soundcloud URL alone) work fine with it, there is no shortcode to customize it. You would need to add custom code for it or research for a plugin that implements such shortcode.

share|improve this answer
    
instead of using the soundcloud url, can the embedded code from sound cloud be used so that is shows smaller icon than big one. –  Santhosh Yedidi Jun 5 at 15:15
    
@SanthoshYedidi If by "embedded code" you mean example code you had shown in question — then no. That would only work on wordpress.com site. –  Rarst Jun 5 at 15:16
    
what about other websites. Also only wordpress can use wordpress.com what about others –  Santhosh Yedidi Jun 5 at 15:26

add this to your functions.php

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

Source: How to Embed SoundCloud in your WordPress Posts by using oEmbed

just make sure its inside <?php ?>

share|improve this answer
    
so after doing this the embed code will work. –  Santhosh Yedidi Jun 5 at 14:04
    
Yes it should work. –  H3r0k0 Jun 5 at 14:12

If you are on WordPress 3.5 or higher just putting the URL on a separate line should work:

https://soundcloud.com/radhanath-swami/offer-the-best-you-have

You do not need to use the embed code, WordPress handles the embedding via oEmbed itself.

Also have a look at the Codex.

EDIT: If you want the small image you probably should have mentioned that in the question...

The easiest way probably is to put the embed code in

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/151456970&amp;color=ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_artwork=true&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false"></iframe>
share|improve this answer
    
it worked, but it shows big image. what to do for small image –  Santhosh Yedidi Jun 5 at 15:04
    
I just updated the answer... –  kraftner Jun 5 at 16:26

The "Wordpress code" checkbox on the soundcloud embed screen is for Wordpress.com users only. If you have a self-hosted (Wordpress.org) site, leave "Wordpress code" unchecked and copy the <iframe> code. Paste that into the HTML view of your wordpress page. Voila!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.