How to replace ‘map’ link text on events page - Squarespace 7.1

If you are looking to replace the text “Map” that sits on the events page, and change it to something like “Get Directions” or something like that, then look no further.

Add the following to your Squarespace site, and change the text ‘Get Directions’ with your own text.


Add this to your Code Injection -> Footer

<script>
  document.querySelectorAll('body[class*="collection-type-event"] a[class$="meta-address-maplink"]').forEach(link => link.textContent = '(Get Directions)')
</script>
Previous
Previous

How to shrink header logo on scroll - Squarespace 7.1

Next
Next

How to allow Google Calendar and ICS to open in a new tab - Squarespace 7.1