Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Per a client's request, I made a nested navigation, and they wanted to keep the parent navigation linked. While the parent navigation is still connected to a collection, it no longer directs to the collection URL when clicked once I added the child navigations below it. This seems to be a common issue and I've done some troubleshooting but have not had success implementing code suggestions given on other community posts (I have some basic code understanding, but am not super skilled). My client uses the Shopify Ride theme (most with the same issue are on the Dawn theme). I'd love some help on this issue from anyone who's succeeded in fixing this issue.
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @avergeront
Go to your Online store > Themes > Edit code, open header-dropdown-menu.liquid and header-mega-menu.liquid files, find those lines of code at very top of those file
<span
{%- if link.child_active %}
class="header__active-menu-item"
{% endif %}
>
{{- link.title | escape -}}
</span>
Wrap them in this code
<a href="{{ link.url }}" style="text-decoration: none; color: rgba(var(--color-foreground),.75);">
add above code here
</a>
So the final code will look like this
<a href="{{ link.url }}" style="text-decoration: none; color: rgba(var(--color-foreground),.75);">
<span
{%- if link.child_active %}
class="header__active-menu-item"
{% endif %}
>
{{- link.title | escape -}}
</span>
</a>
- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This is an accepted solution.
Hi @avergeront
Go to your Online store > Themes > Edit code, open header-dropdown-menu.liquid and header-mega-menu.liquid files, find those lines of code at very top of those file
<span
{%- if link.child_active %}
class="header__active-menu-item"
{% endif %}
>
{{- link.title | escape -}}
</span>
Wrap them in this code
<a href="{{ link.url }}" style="text-decoration: none; color: rgba(var(--color-foreground),.75);">
add above code here
</a>
So the final code will look like this
<a href="{{ link.url }}" style="text-decoration: none; color: rgba(var(--color-foreground),.75);">
<span
{%- if link.child_active %}
class="header__active-menu-item"
{% endif %}
>
{{- link.title | escape -}}
</span>
</a>
- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This worked as a solution, thank you so much!
You are very welcome, @avergeront
- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
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