MackenzieKuck Posted Tuesday at 08:51 PM Share Posted Tuesday at 08:51 PM I needed to use a different logo for a page of my website, so I added the following code into the page header code injection. I was able to get the alternative logo to appear but now it's too small. Adjusting the max-height doesn't seem to help, but it does help prevent the logo from repeating. What code can I add or adjust so that I can make the logo larger? <style> .header-title{ background-image:url('image-url-here'); background-repeat: no-repeat!important; max-height: 100px; background-size: contain } .header-title img{ opacity:0 } </style> Link to comment
MackenzieKuck Posted Tuesday at 08:55 PM Author Share Posted Tuesday at 08:55 PM Also, is there any way to make the alternative logo link a page other than the home page? Link to comment
MackenzieKuck Posted Tuesday at 09:26 PM Author Share Posted Tuesday at 09:26 PM Update: I was able to resolve the height issue! Adding a line of code for min-height worked great. Still searching for a way to modify the link Link to comment
Lesum Posted Tuesday at 09:49 PM Share Posted Tuesday at 09:49 PM @MackenzieKuck Hi! Can you share your site URL for context? If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
MackenzieKuck Posted Tuesday at 09:52 PM Author Share Posted Tuesday at 09:52 PM 2 minutes ago, Lesum said: @MackenzieKuck Hi! Can you share your site URL for context? of course! https://mackenziekuck.com/take-heart-textiles Link to comment
Lesum Posted Tuesday at 10:06 PM Share Posted Tuesday at 10:06 PM @MackenzieKuck If I understand correctly, you want to change the link for the header logo. You can add the following code to the page’s header code injection. Just replace the 'add-url-here' part with your URL. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-title-logo a, .header-mobile-logo a').attr('href','add-url-here'); }); </script> Also I noticed your header logo is not clickable. You need to modify this part of your existing code .header-title{ background-image:url('image-url-here'); background-repeat: no-repeat!important; max-height: 100px; background-size: contain } to the following: .header-title a { background-image:url('image-url-here'); background-repeat: no-repeat!important; max-height: 100px; background-size: contain } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
MackenzieKuck Posted Tuesday at 10:22 PM Author Share Posted Tuesday at 10:22 PM (edited) 16 minutes ago, Lesum said: If I understand correctly, you want to change the link for the header logo. You can add the following code to the page’s header code injection. Just replace the 'add-url-here' part with your URL. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-title-logo a, .header-mobile-logo a').attr('href','add-url-here'); }); </script> Thank you! Revising the code to make the logo clickable worked great. However, I am not sure if I entered the above code correctly. I made sure to revise the 'add-url-here' to be the url that I want to point the link to, and I entered this code below the existing code in the page header code injection, but it still links to the default home page. Edited Tuesday at 10:23 PM by MackenzieKuck Link to comment
Solution Lesum Posted Tuesday at 10:36 PM Solution Share Posted Tuesday at 10:36 PM @MackenzieKuck You just need to add the link inside a quote. So the code should look like this: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-title-logo a, .header-mobile-logo a').attr('href','https://mackenziekuck.com/take-heart-textiles'); }); </script> If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
MackenzieKuck Posted Tuesday at 10:38 PM Author Share Posted Tuesday at 10:38 PM 1 minute ago, Lesum said: You just need to add the link inside a quote. So the code should look like this: That worked! Thanks so much for your help! 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