Website Spotify Embed not Working

Reply
Highlighted

Website Spotify Embed not Working

Casual Listener

Hi, I am attempting to embed the Spotify song player iframe on a website. I have copied the iframe code from Spotify and pasted onto my web page. However the iframe does not load and gives the following console errors:

alicemaserati_0-1601886456976.png

My embed code:

<div class="audio-player">
<div class="resp-container">
<iframe width="300" height="80" class="resp-iframe" src="https://open.spotify.com/embed/track/<?= the_field('hero_track'); ?>" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
</div>
</div>

Could someone please assist me in getting this working? Thanks in advance.

 

 

Plan

Free/Premium

Country

 

Device

(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)

Operating System

(iOS 10, Android Oreo, Windows 10,etc.)

 

My Question or Issue

 

2 Replies
Highlighted

Re: Website Spotify Embed not Working

Spotify
Spotify
Hi!

Are you sure that this line is outputting a valid track id? `<?= the_field('hero_track'); ?>`

Cheers,
Milena
Highlighted

Re: Website Spotify Embed not Working

Casual Listener
Hi Melena,

Yes, see below:

[image: image.png]
SUGGESTED POSTS