Jump to content

Excluding current store product from the summary block

Recommended Posts

I have a summary block displayed on every store product page. Is it possible to exclude the current product from the summary block?

I've found this code that works for blog posts, but doesn't seem to work for store products. Any help would be appreciated.

Website URL: steven.squarespace.com/clients/p/blackfoot-hospitality

Thank you

Link to comment
  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

15 hours ago, tuanphan said:

Try this CSS code

.ProductItem .ProductItem-additional .summary-item:first-child {
    display: none;
}
.ProductItem .ProductItem-additional .summary-item {
    clear: none !important;
}

 

 

Hi Tuan, unfortunately, this code only works if the excluded item is first-child. But it's not always the case in my store. Sometimes the excluded item is first, other times it's 2nd, or 3rd, or last. Is there a JS code that would automatically exclude the current product no matter its position in the summary block?

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.