I'm trying to embed a download link for previews in a music site I'm building for a couple of friends. They are currently filling up the system with content and I'm using a SoundCloud iframe HTML5 code and secret link in a custom field to insert into the track's page:


The 'download' link isn't appearing despite it being enabled in SoundCloud and visible on the SoundCloud page for the track:


Is there any way I can 'force' the download link to appear? I can't see anything in the SC API about modifying the HTML5 embed code to show the download button...

Here's my current code for the embed using Advanced Custom fields:

<?php // Soundcloud preview
if(get_field('sc_preview')) :
echo '<div class="tempsc">' . get_field('sc_preview') . '</div>';
endif; ?>

And there's some embed code as an example:

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/110094906"></iframe>

How do I embed the SoundCloud html5 widget and get the 'download' link to work in the widget? If it involves appending something to the URL of the track, is there a Wordpress function I can use to regex the embed code and add this info?

| improve this question | | | | |

As you may have already found out, presently, soundcloud do not allow modification of parameters with the HTML5 widget and only when using the flash player. See here for more info: http://help.soundcloud.com/customer/portal/articles/241151-can-i-change-parameters-on-embedded-players-

The options for the flash player can be found here: https://github.com/soundcloud/Widget-JS-API/wiki/widget-options

I hope this answers your question anyway.

| improve this answer | | | | |
  • Thanks TomC, appreciate the info. This question was probably better suited for Stackexchange, so I expect it to be closed shortly, but I'll look into those links in the meantime. – Osu Oct 30 '13 at 8:52
  • 1
    and anyone else interested, I managed to actually get the download link to appear using parameters in the iframe URL: <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/110089704&buying=false&download=true&sharing=false"></iframe> - apparently, you have to disable 'buy' in order to see the download link. Again, this isn't a WP-specific thing, so probably best filed in Stackoverflow rather than here as Chip Bennet mentioned. – Osu Oct 30 '13 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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