Jump to content

Post Title link to Source URL, but in new tab?

Recommended Posts

Site URL: https://firstsignals.squarespace.com/

Hey,

 

I set up a summary feed that collects my blog posts in one carousel. Most blog posts are from my own Squarespace site but there are a few ones that directly link to the Source URL (and this is important!) - however, I don't want my visitors to exit my website for a third party's, so I'd like to have the link be opened in a new tab.

How would that be possible?

squarespace-source-link-blog.thumb.png.75c9ad0599ebec01f45c766c77d58dad.png

This is what I mean, but in a new tab.

 

Thanks in advance and greetings

Bastian

Link to comment

You need to use JavaScript in this case.

This needs Business Plan or higher.

Can you share link to carousel in your site?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 3/6/2020 at 5:06 PM, tuanphan said:

You need to use JavaScript in this case.

This needs Business Plan or higher.

Can you share link to carousel in your site?

We currently have the business plan, so that's no problem.

The carousel is on the homepage as well as under this direct slug: https://firstsignals.squarespace.com/feed

I hope, this is what you meant with your question.

 

Greetings,

Bastian

Link to comment
On 3/9/2020 at 6:24 PM, firstsignals said:

We currently have the business plan, so that's no problem.

The carousel is on the homepage as well as under this direct slug: https://firstsignals.squarespace.com/feed

I hope, this is what you meant with your question.

 

Greetings,

Bastian

Add to Home > Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
	$('a.summary-thumbnail-container.sqs-gallery-image-container').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 5 months later...
  • 3 weeks later...
9 hours ago, mbockmaster said:

I'm piggybacking on this question as well, hoping to add links to the titles of blog posts that are in summary blocks. My site is https://olive-dog-9fgf.squarespace.com/blog and the password is bockmaster 

Thank you!

Hi

Use this code in Design -> Custom CSS

.summary-content .summary-title-link {
    pointer-events: all !important;
}

Please use the like button if it helps you!

Best,
Leopold

Ninja Kit Extension: Upgrade your Squarespace website without coding.

YouTube Preview    -    FREE DOWNLOAD

Link to comment
  • 2 weeks later...

I injected <script> tags into my squarespace template making the <main> display:none. Now I cannot edit that section through squarespace because it is gone. Recommendations how to get it back without starting from scratch?

$( "#page" ).css( "display", "none" );

was the code I injected into the HTML.

Thank you in advance.

        moving house

Link to comment
1 hour ago, luchy said:

I injected <script> tags into my squarespace template making the <main> display:none. Now I cannot edit that section through squarespace because it is gone. Recommendations how to get it back without starting from scratch?

$( "#page" ).css( "display", "none" );

was the code I injected into the HTML.

Thank you in advance.

        moving house

try edit #page to

body:not(.sqs-edit-mode) #page

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 year later...

When you add the link in post settings (the external link that you want the title to link to), simply add this to the end: 

" target="_blank

Important: 

  • this goes at the END of the link
  • make sure there is NOT a space between the end of your link and the first quotation mark
  • do NOT add an end quotation mark after blank

Example attached.

Screen Shot 2022-01-11 at 9.34.36 AM.png

Link to comment

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.