Jump to content

Bedford / Clickthrough URL in Gallery / Open In New Window Question

Recommended Posts

Bedford TemplateSite: www.workinghorsemagazine.comArea in question: Please scroll down below the image of the current cover to the gallery below the text "Click on the images below to learn more about our friends who are featured in the current issue! "

Each image in the Gallery has a clickthrough URL to the advertisers website. However, I would prefer it to Open In New Window. This is not showing as an option in individual image settings or on the Design tab for either Slideshow or Carousel.

Am I missing something? Or is Open In A New Window just not an option in the Gallery with the Bedford template?

Thanks in advance for your help.

alt text

ss-screenshots.jpg.e89404f7dc7165f4cc2deb12a95704b6.jpg

Link to comment
  • Replies 3
  • Views 1.6k
  • Created
  • Last Reply

It looks like it's not a default option (which it should be), so you can make it happen by going to:

Settings > Advanced > Code Injection

Once there, paste this in "HEADER":


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

And paste this in "FOOTER":


<script>$('.sqs-block-gallery a').attr('target','_blank')</script>

That will change ALL gallery image links on your site to new tab links, just fyi.The 'header injection' is called jquery, which allows us to use the code in the footer injection. I just tested on my squarespace site and it works.

Link to comment
  • 4 months later...

Archived

This topic is now archived and is 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.