MoltoBello Posted September 5, 2020 Share Posted September 5, 2020 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
tuanphan Posted September 5, 2020 Share Posted September 5, 2020 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.