Shopify themes, liquid, logos, and UX
Hello All. I have tried everything to make the parent menu clickable. I have the hover on menu turned on and when i click the parent menu it just opens and closes the subcategories. I have looked everywhere and rewrote codes from what I found online. I cannot seem to figure this out. Any help would be greatly appreciated
Hi @Kenkash
1: Online store > themes > Actions > Edit code > Sections > header.liquid
2: find this code, if you have not edited before it's at line 466
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}>{{ link.title | escape }}</span>
3: replace with this code.
<a href="{{ link.url }}" class="header__menu-item" style="padding: 0;">
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}>{{ link.title | escape }}</span>
</a>
4: save and done 🎊
Hello Kani. Thank you for that. Unfortunatly, it did not work. I removed the old and replacedwith the new. same thing is happening. Please see attached image. for me it was on line 454.. ant help would be appreciated
If you don't mind please DM me your store url I will send a collaborator access to your store 🙂
Please excuse the content. Thanks
done 🙂
you can preview in this theme
Hello! This solution worked on desktop version, do you have any tip how to make it run on mobile, please ?
Hope to get an answer ^^
Kind regards,
Nadya
I can't seem to find this code inside the header.liquid in the latest update of Dawn Theme.
Same Problem here. - With the older Version of the Dawn-Theme, this solution works finde. But 10.0. it did not
Same problem for me also 10.0 it didn't work
did you find a solution?
Hey
Thank you, it worked. I had to edit "header-dropdown-menu.liquid"
Can you help me in making this also clickable? it's a dropdown within a dropdown.
Current theme: Dawn 10.0.0
Thank you @Kani! This code worked for me! (and I've spent HOURS searching the forum and trying other people's code, all with fail)
For people wondering, the key is to replace it in TWO theme files for Dawn 14.0 ---
1. header-mega-menu.liquid
2. header-dropdown-menu.liquid
This makes the parent menu items linkable WITHOUT messing up the styling (color, underline, etc.).
.... Before this thread I found a solution that made the menu item linkable, but changed the link colors to blue and purple. Then I found another solution that fixed the coloring issue, but ended up affecting ALL the links on my site, not just the menu ones (overriding every custom button and color scheme). @Kani's is the only one that works without breaking anything else!
The next thing you'll need to do is update the mobile menu as well...
For that, @LitCommerce gave the solution in this post here.
The key for that solution is to apply the code in the header-drawer.liquid file for Dawn 14.0.
Hope this helps some people!
I spent a LOT of time trying outdated and problematic solutions, to finally find these that work (you just have to put the code in the right files for 2024!).
Hello Kani. Thanks for your valuable input, can you please guide on how i can make the highlighted menu clickable where it takes me to a separate page in addition to it opening sub categories. my site url is https://binirfan.com.
i am using Dawn theme 13.0.1
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024