Jump to content

Getting an embeded player in the navbar of my site

Recommended Posts

Hello coding friends.

I'm wanting to embed a player from radio co on our website in the nav bar.

I have the embedded code : <script src="https://embed.radio.co/player/02afc32.js"></script>

I've injected the code into the footer section (as i believe this will put it in the body of the code). The player shows up but at the bottom of the page underneath the footer. I have tried targeting it with the class .radioplayer to add css to move it (as i believe thats what the class is from inspecting the page code) but its staying at the bottom of the page.

My website url is https://www.mondo.radio/

Please help if you can!!

 

 

Link to comment

Add this to Website > Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
     setTimeout( function() {
        $('iframe[src*="radio.co"]').appendTo('.header-nav-wrapper');
    }, 5000);
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Heya!

 

Thanks for that. Its now in the header. I wondered if theres a way to get code to get it to continually play as you browse the pages? Also it only shows up on the home page, is there a way for it to be there on every page?

 

Thanks so much for your help

Link to comment
On 9/5/2023 at 10:01 PM, MondoRadio said:

Actually it is on every page just takes a while to load up

Yes. The code needs 5 seconds (5000) to load. You can adjust 5000 in the code

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 weeks later...
On 9/15/2023 at 10:37 PM, MondoRadio said:

Thanks for that!  I wondered if theres a way to get code to get it to continually play as you browse the pages? Also it only shows up on the home page, is there a way for it to be there on every page?

#1. I don't know this

#2. Where did you add embed code? 

image.thumb.png.331562a614a2ffb05839b1a7433cc38b.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.