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.
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
Copy and paste the code as indicated above.
Edit the text to your desired phrase.