Joseph21 Posted December 25, 2020 Posted December 25, 2020 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!
creedon Posted December 25, 2020 Posted December 25, 2020 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. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
derricksrandomviews Posted December 25, 2020 Posted December 25, 2020 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. Click in the URL field. Click Web Address in the link editor. Enter a site URL under Link. Switch the Open in New Window toggle on to have the link open in a new tab. Click Save, then click Apply or Save.
tuanphan Posted December 29, 2020 Posted December 29, 2020 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> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Joseph21 Posted December 30, 2020 Author Posted December 30, 2020 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.