Re: Linked Parent Navigation

Solved

How can I fix a linked parent navigation issue in Shopify Ride theme?

avergeront
Shopify Partner
2 0 1

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 

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
12018 2348 2527

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>

Screenshot_7.jpg

 

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 4 (4)

Dan-From-Ryviu
Shopify Partner
12018 2348 2527

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>

Screenshot_7.jpg

 

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

avergeront
Shopify Partner
2 0 1

This worked as a solution, thank you so much!

Dan-From-Ryviu
Shopify Partner
12018 2348 2527

You are very welcome, @avergeront 

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

einstijntje
Shopify Partner
4 0 2

This also worked for me, thanks a lot!
It does not seem to work for mobile, do you have a solution for this?

Thanks in advance!