Jump to content

Disable blog thumbnail link

Recommended Posts

Site URL: https://jeanne-m-juneau.squarespace.com/

Hi, I'd like to disable the blog thumbnail link. Is there any custom code for this? I'm using the Summary block Carousel to display some portfolio work using the forward and back arrow navigation to scroll between my portfolio pieces and don't want the image to be linked. I've tried this custom code, below, but it does not work. Does anyone have custom code to disable the blog thumbnail link in a summary section using the carousel?

https://jeanne-m-juneau.squarespace.com/web-design

pw is 123

/* disable blog thumbnail link */
section.blog-image-wrapper {
    pointer-events: none;
}

Link to comment
  • Replies 10
  • Views 816
  • Created
  • Last Reply

the pointer-events:none; bit is the right code to disable a link using just css, but you need to specify exactly which links you want to disable. the code you've supplied won't find the links you want. The answer will depend on how fine-grained you want the code to work. if you only wanted it to work on that one section, then you need to target the links using that particular section id. something like this:

div#yui_3_17_2_1_1627258107628_88 a {
	pointer-events:none;
}

the section id can be found using a squarespace block identifier extension on chrome, or looking in the source using chrome's developer settings.

the code you posted will only work for blog-image-wrapper instances, which dont' apply in a carousel setup (as far as I can tell looking at your site)

hope that helps

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment
On 7/25/2021 at 5:22 PM, iamdavehart said:

the pointer-events:none; bit is the right code to disable a link using just css, but you need to specify exactly which links you want to disable. the code you've supplied won't find the links you want. The answer will depend on how fine-grained you want the code to work. if you only wanted it to work on that one section, then you need to target the links using that particular section id. something like this:

div#yui_3_17_2_1_1627258107628_88 a {
	pointer-events:none;
}

the section id can be found using a squarespace block identifier extension on chrome, or looking in the source using chrome's developer settings.

the code you posted will only work for blog-image-wrapper instances, which dont' apply in a carousel setup (as far as I can tell looking at your site)

hope that helps

Thank you! I found the section id, used this div#page-section-60fb7c850fd9d65c7436c370 a {
    pointer-events:none;} 
and it worked. No more linked blog thumbnails. Many thanks for your help.

Link to comment
46 minutes ago, islandgirl said:

Thank you! I found the section id, used this div#page-section-60fb7c850fd9d65c7436c370 a {
    pointer-events:none;} 
and it worked. No more linked blog thumbnails. Many thanks for your help.

Dang! Except that now the links in the text won't work. Maybe I should have asked this question: Is there a way to change the thumbnail link to a different link?

Link to comment

the section Id you've used is a very high up and contains basically most of your site. 

you need to use something a lot more specific.

try this one instead. this says find the section with id yui_3...._107 (which is your summary item wrapper, then find the summary-thumbnail-otuer-container within that (so it leaves the metadata captions beneath along) and then all the links (a) inside there.

#yui_3_17_2_1_1627420698207_107 .summary-thumbnail-outer-container a {
	pointer-events: none;
}

try that. see how you get on.

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • 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.