Jump to content

How to open Link Post Title to Source URL in the same tab/NOT a new tab

Recommended Posts

Hi there,

I am using the linking Post Title to Source URL and want the blog post title links to open in the same tab.

I tried to used this code but understand it makes all external link open in the same tab:

<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>

However, I would like to keep the social links and the About link to open in a new tab.

Is there a way to open only blog post links in the same tab and keep social links and About link open in a new tab?

Link to comment
  • Replies 1
  • Views 150
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.