Edit the Event Button Text and Backlink

What does this code do?

This code snippet works on Event Pages in both Squarespace 7.0 and 7.1. It will allow you to change the words “View Event” in the Event Button that appears for past events. This will also allow you to change the words in the event post’s backlink from “Back to Events” to text of your choice.

Screen Shot 2021-09-08 at 1.27.49 PM.png
Screen Shot 2021-09-08 at 1.28.56 PM.png
 

Code Snippets

Javascript

Copy and paste this code into Settings > Advanced > Code Injection > Footer

<!-- Custom Event Buttons --> <script> var eventButton = document.querySelectorAll(".eventlist-button"); for (let i = 0; i < eventButton.length; i++) { eventButton[i].innerHTML = "YOUR TEXT HERE →"; eventButton[i].style.visibility = "visible"; } var eventBacklink = document.querySelectorAll(".eventitem-backlink"); for (let j = 0; j < eventBacklink.length; j++) { eventBacklink[j].innerHTML = "YOUR TEXT HERE"; eventBacklink[j].style.visibility = "visible"; } </script>

Then edit the text to your desired phrase.

CSS

Copy and paste this code into Design > Custom CSS

/* Custom Event Button */ .eventlist-button, .eventitem-backlink { visibility: hidden; }
 

How To Use It

  1. Copy and paste the code as indicated above.

  2. Edit the text to your desired phrase.

Rebecca Grace

Rebecca Grace is a Squarespace CSS Expert and Website Designer.

https://rebeccagracedesigns.com
Previous
Previous

Add Spacing Between Images in a Gallery Reel

Next
Next

Change the Color of the Search Bar