[Solved] Change link URL to a different link depending on the page
Try something along the lines of this… $(document).ready(function() { var url = window.location.href; var UrlofpageX = url.indexOf(‘theurlyouwanttolookfor’); if (UrlofpageX >= 0) { $(‘.yourlink’).append(‘<a href=”https://website-B”><li>Your different link</li></a>’); } else { $(‘.yourlink’).append(‘<a href=”https://website-A”><li>Your original link</li></a>’); } }); So what happens here is you get the URL of the page that you’re currently on. It gets stored in … Read more