Jump to content

Clickable Code Block

Recommended Posts

  • Replies 4
  • Views 525
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

1 hour ago, longstrider28 said:

Site URL: http://www.faisalalmutairi.com

Hi. I have an embedded autoplay video on the main page. This should feature the main story on the website. Is it possible to click on the block to take me to a different page? Thanks. Faisal.

which pages you want to link? Do you mean clicking the auto video will direct to your target page? 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
4 hours ago, longstrider28 said:

Yes.

Try in Home > Settings > Advanced > Code injection 

add to the footer

<script>
  const wrapperVideo = document.querySelector('#block-yui_3_17_2_1_1634342914633_3172 center').innerHTML;

  document.querySelector('#block-yui_3_17_2_1_1634342914633_3172 center').innerHTML = <a href = "https://www.google.com/" target = "_blank">${wrapperVideo}</a>
</script>

Change the link in a tag define the page you want to direct

Support me by pressing 👍 if this useful for you

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
1 hour ago, bangank36 said:

Try in Home > Settings > Advanced > Code injection 

add to the footer

<script>
  const wrapperVideo = document.querySelector('#block-yui_3_17_2_1_1634342914633_3172 center').innerHTML;

  document.querySelector('#block-yui_3_17_2_1_1634342914633_3172 center').innerHTML = <a href = "https://www.google.com/" target = "_blank">${wrapperVideo}</a>
</script>

Change the link in a tag define the page you want to direct

Support me by pressing 👍 if this useful for you

Sorry I tried it and it doesn't work.

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.