MaBa00 Posted November 10, 2023 Posted November 10, 2023 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?
MaBa00 Posted November 10, 2023 Author Posted November 10, 2023 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?
Web_Solutions Posted November 10, 2023 Posted November 10, 2023 (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, 2023 by Web_Solutions Kobir and tuanphan 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.
MaBa00 Posted November 24, 2023 Author Posted November 24, 2023 Thnaks for the answer but unfortunately doesn't work either
Web_Solutions Posted November 25, 2023 Posted November 25, 2023 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment