mister_nar Posted June 11, 2023 Posted June 11, 2023 I know I can just add links to the main navigation to go to categories but my issues is it won't show those pages as active because it considers them external links. There is a button in store settings> categories> that says "add to main navigation" (see attachment for reference screenshot) but it doesn't do anything/ doesn't work when clicked. Any insight would be much appreciated. Thank you!
tuanphan Posted June 13, 2023 Posted June 13, 2023 Hi, I think we can add code to make it show as active link. If you share link to your site, we can check easier 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!)
mister_nar Posted June 21, 2023 Author Posted June 21, 2023 Sorry for the delay. here is the link https://narmfg.com Thank you!
tuanphan Posted June 23, 2023 Posted June 23, 2023 On 6/21/2023 at 10:23 PM, mister_nar said: Sorry for the delay. here is the link https://narmfg.com Thank you! You mean make these underline when users on? 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!)
mister_nar Posted June 24, 2023 Author Posted June 24, 2023 On 6/23/2023 at 4:10 AM, tuanphan said: You mean make these underline when users on? Yes.
tuanphan Posted June 25, 2023 Posted June 25, 2023 14 hours ago, mister_nar said: Yes. Try adding this code to Last Line in Code Injection > Footer <script> if (document.location.pathname.indexOf("/shop/manufacturing") == 0) { document.querySelector('body').classList.add('t-active') } if (document.location.pathname.indexOf("/shop/supply") == 0) { document.querySelector('body').classList.add('t-active') } </script> <style> t.active header#header [href*="/shop/manufa"], t.active header#header [href*="/shop/supply"] { border-bottom: 1px solid; } </style> 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!)
mister_nar Posted June 25, 2023 Author Posted June 25, 2023 hmmmm I've the code in there but it doesn't seem to be working.
Solution tuanphan Posted June 27, 2023 Solution Posted June 27, 2023 On 6/26/2023 at 1:21 AM, mister_nar said: hmmmm I've the code in there but it doesn't seem to be working. I miss a - symbol. Use this new code <script> if (document.location.pathname.indexOf("/shop/manufacturing") == 0) { document.querySelector('body').classList.add('t-active') } if (document.location.pathname.indexOf("/shop/supply") == 0) { document.querySelector('body').classList.add('t-active') } </script> <style> body.t-active header#header [href*="/shop/manufa"], body.t-active header#header [href*="/shop/supply"] { border-bottom: 1px solid; } </style> 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!)
mister_nar Posted June 28, 2023 Author Posted June 28, 2023 On 6/27/2023 at 1:46 AM, tuanphan said: Thanks. I had to change one of the 't-active' so they wouldn't both be underlined and now it works. tuanphan 1
TRBZINK Posted July 22, 2023 Posted July 22, 2023 i am having the same problem, with categories not showing in the header, the solution above is not working? and i configured the code to use the /shop/abode like my site categories. https://conch-platinum-mf8h.squarespace.com/
tuanphan Posted July 25, 2023 Posted July 25, 2023 On 7/23/2023 at 6:46 AM, TRBZINK said: i am having the same problem, with categories not showing in the header, the solution above is not working? and i configured the code to use the /shop/abode like my site categories. https://conch-platinum-mf8h.squarespace.com/ What is access password? 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!)
tuanphan Posted October 6 Posted October 6 Follow this to add categories to Navigation or Navigation Dropdown Folder Widle 1 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment