Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Removing Commas with Javascript/Jquery

Go to solution Solved by Jolsonphotography,


Site URL: https://jolsonweddings.com/stories

I'm looking for a way to target and replace commas in my blog summery block, so that the metadata below the title displays as "Destination Wedding" instead of "Destination, Wedding".

I'm hoping there's a way to target and replace the comma with some kinda of script, I was able to do something similar with my homepage using the following code:


<script>$('.sqmuse-slider-type-8').html($('.sqmuse-slider-type-8').html().replace("Elopement,Wedding","Elopement Wedding"));
  $('.sqmuse-slider-type-8').html($('.sqmuse-slider-type-8').html().replace("Destination,Wedding","Destination Wedding"));

Can't seem to do the same with the Blog Summary though, anyone have any ideas?

Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 1

After hours of fiddling with code, I was able to come up with my own solution.

  $('.sqs-block-summary-v2').map(function(val, i) {
    this.innerHTML = this.innerHTML.replace(/,/g, ' ');


Removes all commas from the Squarespace Catagory Metadata when using summery in Version 7.0.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...