rlevitz Posted March 27, 2020 Share Posted March 27, 2020 Site URL: http://levitzmattress.com Hey everyone, I'm trying to get the folder name of my nav bar to link to other page. I know, I know, use <a href>. I did (I used this page for the how-to), and it worked great for a long time. Suddenly it stopped doing anything. It's like the code isn't there. If someone wouldn't mind, could you go to my site (levitzmattress.com). The "Mattress" nav button should take you to /mattresses-3, which is a guide to help get you to the right mattress. What is actually happening is that it taking you to /mattresses-1 which is just the main product page. What makes things even more complicated, is that its taking you to /mattresses-1 and only showing the Tempurpedic category, instead of all of them. Similar issues are happening with the Foundations and Accessories nav buttons. How can I fix this? If you go directly to http://levitzmattress.com/mattresses-1 it does the same thing; only shows you Tempurpedic. I have links in certain marketing assets that take users to this page. I want it to automatically show All categories upon arriving here. How can that be done? Any and all help would be greatly appreciated. Thanks! PS This is the Hyde template. Link to comment
tuanphan Posted March 28, 2020 Share Posted March 28, 2020 Add to Home > Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.Header-nav-folder-title[href="/mattresses-1"]').attr('href','/mattresses-3'); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
rlevitz Posted March 31, 2020 Author Share Posted March 31, 2020 On 3/27/2020 at 8:53 PM, tuanphan said: Add to Home > Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function() { $('.Header-nav-folder-title[href="/mattresses-1"]').attr('href','/mattresses-3'); }); </script> That partially fixes it. I have added that code, and you can see that the first time you click it, it will go to the correct page. If you then click the logo to go back to the home, the nav folder link will take you back to the incorrect page. Link to comment
tuanphan Posted April 1, 2020 Share Posted April 1, 2020 8 hours ago, rlevitz said: That partially fixes it. I have added that code, and you can see that the first time you click it, it will go to the correct page. If you then click the logo to go back to the home, the nav folder link will take you back to the incorrect page. Try disabling Ajax Loading https://support.squarespace.com/hc/en-us/articles/115000253288-Ajax-loading Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
rlevitz Posted April 1, 2020 Author Share Posted April 1, 2020 That worked! I tweaked that script so it works on all of my nav folders. Any ideas as to why the href in the folder suddenly stopped working? Link to comment
derricksrandomviews Posted April 1, 2020 Share Posted April 1, 2020 (edited) Nav folders by default can have their own url slug just like a page so you can get to the first link in the folder without having to go thru the site menu. like mine https://myrandomviews.com/lessons the link is disabled on the nav bar so a viewer doesn't accidentally chose it and go back to the first link in the folder when they meant to go to one of the other ones. Edited April 1, 2020 by derricksrandomviews Link to comment
hudson Posted April 9, 2020 Share Posted April 9, 2020 @tuanphan Great solution - and works well for Squarespace 7 - as at April 2020. Several other solutions to similar questions no longer work. tuanphan 1 Link to comment
Guest Posted January 23, 2021 Share Posted January 23, 2021 On 3/27/2020 at 10:21 PM, rlevitz said: Site URL: http://levitzmattress.com Hey everyone, I'm trying to get the folder name of my nav bar to link to other page. I know, I know, use <a href>. I did (I used this page for the how-to), and it worked great for a long time. Suddenly it stopped doing anything. It's like the code isn't there. If someone wouldn't mind, could you go to my site (levitzmattress.com). The "Mattress" nav button should take you to /mattresses-3, which is a guide to help get you to the right best futons for everyday sleeping mattress. What is actually happening is that it taking you to /mattresses-1 which is just the main product page. What makes things even more complicated, is that its taking you to /mattresses-1 and only showing the Tempurpedic category, instead of all of them. Similar issues are happening with the Foundations and Accessories nav buttons. How can I fix this? If you go directly to http://levitzmattress.com/mattresses-1 it does the same thing; only shows you Tempurpedic. I have links in certain marketing assets that take users to this page. I want it to automatically show All categories upon arriving here. How can that be done? Any and all help would be greatly appreciated. Thanks! PS This is the Hyde template. Same issue. Link to comment
tuanphan Posted January 24, 2021 Share Posted January 24, 2021 11 hours ago, skrobbin said: Same issue. Can you share your site url? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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