Forum

Thread tagged as: Addons, Blog

Embedding Soundcloud/Mixcloud players on blog

Hi,

I'm having a problem with embedding either Soundcloud or Mixcloud players into my blog page.

I first started getting 403 Forbidden errors when I tried to save blog post and was able to get my hosting provider to relax mod_security for my entire domain in order to allow me to post to pages. The embedded players showed on the first post.

Now however, when I add a new post, the player does not show on webpage, yet I am able to view the player widget within Perch. I am using Redactor editor and pasting in <iframe> embed code from either Soundcloud or Mixcloud. I have tried to embed a Youtube video as well, just to test but no luck.

<perch:if exists="embed-player">
<div class="player-container">
<perch:blog id="Soundcloud2" type="textarea" order="7" editor="redactor" html="true"  label="Embed Soundcloud or Mixcloud" size="s" />
</div> 
 </perch:if>

Thanks, Orla

Orla Kirwan

Orla Kirwan 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What output do you get on your page?

On the page where player works I have: (https://airpi.ie/blog/post.php?s=alan-meaney)

<hr>
<h5>Samples of work:</h5>
<div class="video-container">
<iframe src="https://www.mixcloud.com/widget/iframe/?feed=https%3A%2F%2Fwww.mixcloud.com%2FAlanMeaney%2Ffairies-only-wear-wings-episode-1%2F&light=1" width="100%" height="200" frameborder="0">
<iframe scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/217008107&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false" width="100%" height="166" frameborder="no">
</div>
<hr>

On page where it's not working I have: (https://airpi.ie/blog/post.php?s=liam-geraghty)

<hr>
<h5>Samples of work:</h5>
<hr>

The div containing the players does not show at all.

Simon Clay

Simon Clay 127 points

You have <perch:if exists="embed-player">, but in the code you show there isn't a perch field with that ID. Perhaps you mean <perch:if exists="Soundcloud2"> ?

Hi Simon,

I did indeed mean ~~~<perch:if exists="Soundcloud2">~~~ ! ;-)

Thanks for that. All players showing as should.

Simon Clay

Simon Clay 127 points

Great :)