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

Open all site links in same tab - Squarespace 7.1


Joseph21

Recommended Posts

Hello, 

Is it possible to have all my site's hyperlinks open in same tab in Squarespace 7.1?

 

Currently, links, including source URL links in posts, open a new tab. I prefer all links to never open a new tab.

Thank you so much for your help!

Edited by Joseph21
Link to post
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You can also try adding this to Home > Settings > Advanced > Code Injection > Footer <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script&g

Please post the URL to your site.

If your site is not public please set up a site-wide password, if you've not already done so. Post the password here.

We can then take a look at your issue.

Hello I'm Thomas. I've been getting websites up and running for 27 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Link to post

When you make a hyperlink including click thru urls  and add the url do not choose open in new window and it will not create a new tab. New window new tab, same window same tab. Note below what makes the link open in a new tab. 

  1. Click the gear icon in the URL field.
  2. Click Web Address in the link editor.
  3. Enter a site URL under Link.
  4. Switch the Open in New Window toggle on to have the link open in a new tab.
  5. Click Save, then click Apply or Save.
Edited by derricksrandomviews
Link to post

You can also try adding this to Home > Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('a').attr('target','_self');
});
</script>

 

Link to post

Tuanphan you are the best!

I spent much time trying to find a way to solve this problem. The code you shared solved it.

Thank you so much for your great help!

Edited by Joseph21
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...