Jump to content

Redirecting Links

Recommended Posts

Site URL: http://lakerenfaire.com/

I am trying to redirect the backlinks at the top of individual events when you click the event. The backlinks are at the top of each individual event page as "Back to All Events" where they currently link to https://lakerenfaire.com/virtual-faire-nobility/ and should instead link back to the main page at https://lakerenfaire.com/virtual-faire/. Trying to figure out what I am missing to get this function as intended for each event.

The current jQuery I am trying to use is as follows:

<!--- events page backlink redirect for virtual faire -->
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
$("a[href='https://lakerenfaire.com/virtual-faire-nobility/']").attr('href', 'http://lakerenfaire.com/virtual-faire/')
</script>

 

Link to comment
  • Replies 1
  • Views 1.6k
  • Created
  • Last Reply

Add to Code Injection Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('.eventitem-backlink').attr('href','https://beaverhero.com');
});
</script>

Replace beaverhero with new url

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.