MaBa00 Posted November 10 Share Posted November 10 Hi all, I would like the logo in the header to link to an external page. I tried to add to inject the following code in the header section: <script> document.querySelector('.header-title-logo a').setAttribute('href', 'https://www.radici.se/'); </script> but it doesn't work. Can someone pleae help me? Link to comment
MaBa00 Posted November 10 Author Share Posted November 10 Hi, the logo in my header should point to a page external to my website. I have tried to inject the following code: <script> document.querySelector('.logo-image a').setAttribute('href', '/https://www.google.com/'); </script> but did not work. Can someone help me? Link to comment
Web_Solutions Posted November 10 Share Posted November 10 (edited) 25 minutes ago, MaBa00 said: Hi, the logo in my header should point to a page external to my website. I have tried to inject the following code: <script> document.querySelector('.logo-image a').setAttribute('href', '/https://www.google.com/'); </script> but did not work. Can someone help me? Add these code on Code Injection > Header Section. <script src="https://code.jquery.com/jquery-3.6.3.min.js"></script> <script> $(function(){ $('.header-title-logo a').attr("href", "https://www.google.com"); }); </script> Edited November 10 by Web_Solutions tuanphan and Kobir 2 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
MaBa00 Posted November 24 Author Share Posted November 24 Thnaks for the answer but unfortunately doesn't work either Link to comment
Web_Solutions Posted November 25 Share Posted November 25 14 hours ago, MaBa00 said: Thnaks for the answer but unfortunately doesn't work either Can you share your website URL? If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment