Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Links Open in New Tab Desktop Only

Recommended Posts

Site URL: https://sisterswhohustle.co/

I'm trying to figure out how to make text links and image links open in a new window on DESKTOP ONLY.

But I'd like these same text links and image links to open in the same window on mobile.

I'm using the SKYE template. Is this possible?

Reason being, all my external links go to Amazon to push affiliate sales. If I have "open in a new window" turned on, the links won't automatically open in the Amazon app on mobile and I need them to. But when I uncheck "open in a new window", they DO open in the Amazon shopping app automatically on mobile, but redirect away from my website on desktop.

Thanks in advance!

Link to post
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

8 hours ago, brooxie said:

OK, I just upgraded to a business plan. 

What's the code I need to add and where?

Thank you for your help!!

Try adding to Home > Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  // by tuan phan - squarespace forum
  $(document).ready(function() {
    if (jQuery(window).width() < 640) {
    $(".html-block a").attr('target','_self');


Edited by tuanphan

You can send your question to my email to get detail answer. / How to Setup Password & Share URL

--- Happy New Year

Link to post

Create an account or sign in to comment

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

  • Create New...