Automatically add “View Event” buttons to a Squarespace 7.1 Events page
Inexplicably, Squarespace 7.1 does not enable View Event buttons on Events index pages. Here is a way to add them automatically with a bit of custom scripting.
Place this in the Footer section of Advanced > Code Injection (you will need at least the Business plan to do this):
Note that if you are already adding jQuery on the page, you don't need to (shouldn't) do it again.
Possible Customizations
- Change button size: 'small', 'medium', or 'large'
- Change the button text from "View Event" to whatever you want.
- Remove the '.eventlist-event--upcoming ' from the jQuery selector to target ALL events, not just upcoming ones
I hope that helps!
Have a question or comment about this post, or just want to say hi? Drop me a line
Earlier Post: How do I make one product go directly to checkout in Squarespace?
Later Post: A New Battery