Jump to content

Need backlink changed to direct to a different page

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://goldbess2021.squarespace.com/events/defensive-handgun-course-may-3-2022-na438-b999k

I have an events page /events that I don't want accessible on the site but use it for a calendar & summary block on /booking. Right now this events page is accessible by selecting an event and then clicking the backlink at the top of the page that says "Back To All Events". I need the backlink to direct to /booking instead of /events to avoid visitors for accessing this page.

PW: GB2021!

Link to comment
  • Solution
2 hours ago, jacauschi23 said:

Site URL: https://goldbess2021.squarespace.com/events/defensive-handgun-course-may-3-2022-na438-b999k

I have an events page /events that I don't want accessible on the site but use it for a calendar & summary block on /booking. Right now this events page is accessible by selecting an event and then clicking the backlink at the top of the page that says "Back To All Events". I need the backlink to direct to /booking instead of /events to avoid visitors for accessing this page.

PW: GB2021!

Try adding to Home > Settings > Advanced > Code Injection, choose footer

<script>
  (function() {
    window.addEventListener('DOMContentLoaded', () => {
      const backEventLink = document.querySelector('.eventitem-backlink');
      if(backEventLink) {
        backEventLink.setAttribute('href','/booking');
      }
    });
  })()
</script>

Let me know how it works on your site

Support me by pressing 👍 if this useful for you

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.