Jump to content

Different background image every time you visit?

Recommended Posts

  • 1 month later...
  • Replies 35
  • Views 22.6k
  • Created
  • Last Reply
  • 2 months later...

Hi Bernard, thanks so much for this. Is there any way to get this to work for the background images on a cover page?

This is the link to my home page - https://koushik-sarkar.squarespace.com/

Like I said, I'm using a cover page to achieve this layout. I tried modifying your code to work on it but to no avail. Here it is -


var image=document.getElementsByClassName("sqs-slice-gallery-item content-fill sqs-gallery-design-stacked-slide loaded sql-active-slide");

Any help would be much appreciated! Thanks in advance.

Link to comment
  • 1 month later...
  • 3 weeks later...

Hi-@bernardwest I am trying to do this with the homepage banner; that is: I would like a different image to show each time the user visits the page.

I tried the code in the code injection--> footerthen tried to put it in the code injection--> header (due to I am not changing the background image but I am changing the header banner.)

Link to comment

Hi-@bernardwest I am trying to do this with the homepage banner; that is: I would like a different image to show each time the user visits the page.

I tried the code in the code injection--> footerthen tried to put it in the code injection--> header (due to I am not changing the background image but I am changing the header banner.)

Link to comment
  • 1 month later...
  • 1 year later...

Is there a way to adapt this code so it will work for my Cover Page? Right now my page is using a slideshow, but I would prefer it so that every time someone visits my website, there is a different image that is displayed on my cover page. Thanks!

www.daveangilella.com for reference, using the Forte template.

Link to comment

Is there a way to adapt this code so it will work for my Cover Page? Right now my page is using a slideshow, but I would prefer it so that every time someone visits my website, there is a different image that is displayed on my cover page. Thanks!

www.daveangilella.com for reference, using the Forte template.

Link to comment

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.

×
×
  • 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.