chrisdunn Posted October 3 Share Posted October 3 I'm working on a members home area for my site which contains a different logo. I'm using the original navigation but I'd like to change to the link for that logo only on this page? I've only seen code to change the logo link site-wide, I'm hoping there is a way to do this for only one specific page. Link to comment
KwameAndCo Posted October 3 Share Posted October 3 7.0 or 7.1? Please share the site. If 7.1 you can add this to your global footer as long as you replace the collectionid for the page. <script> document.querySelector('#collecitonID #site-title').href = 'https://new-link.com'; </script> Or you can add this to the page's header injection if you don't want it cluttering your global footer. <script> document.addEventListener('DOMContentLoaded', () => { document.querySelector('#site-title')?.setAttribute('href', 'https://new-link.com'); }); </script> Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 For Custom Plugins email me 🧩 Link to comment
chrisdunn Posted October 4 Author Share Posted October 4 (edited) Tried both of these, can't seem to get either to work @KwameAndCo. https://archipelagopresets.com/members-home Edited October 4 by chrisdunn Link to comment
tuanphan Posted October 7 Share Posted October 7 On 10/6/2024 at 1:09 AM, chrisdunn said: Anyone else have any ideas? You can use this code to Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('body:has(div#sqs-paywall-page-root) div.header-title a').attr('href','https://google.com'); }); </script> 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
chrisdunn Posted October 7 Author Share Posted October 7 @tuanphan thank you. This only seems to work in front of the paywall (non members). Any idea how I can get this to function behind the paywall for members? Link to comment
Solution KwameAndCo Posted October 7 Solution Share Posted October 7 My bad, wrong selector. Use this instead in global footer <script> document.querySelector('#collecitonID .header-title-logo a').href = 'https://new-link.com'; </script> Or this in the page header <script> document.addEventListener('DOMContentLoaded', () => { document.querySelector('.header-title-logo a')?.setAttribute('href', 'https://new-link.com'); }); </script> Be sure to change the collection ID. tuanphan 1 Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 For Custom Plugins email me 🧩 Link to comment
chrisdunn Posted October 8 Author Share Posted October 8 @KwameAndCo that did it! Thank you so much! 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