Jump to content

How do I remove comma's between my category div's on summary block?

Recommended Posts

  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Try adding this to Settings > Advanced > Code Injection > Footer:

<!-- Hide commas between categories in Summary Block on Sqs 7.1 ------>
<script> 
window.onload = function(){
  var cats = document.querySelectorAll('.summary-metadata-item--cats');
  for(var i=0; i < cats.length; i++) {
    cats[i].innerHTML = cats[i].innerHTML.replace(/\,/g,'');
  }
}  
</script>

Notes:

  • This is for Summary Block Grids on Squarespace 7.1.
  • Squarespace change their code frequently and without warning, so this may not work in future. Code provided in March 2021.
  • This requires JavaScript, so you'll need to be on a Business Plan or above.

   If this helps you, please click "Like" below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.