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
9171 1836 1870

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 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.

View solution in original post

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
9171 1836 1870

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 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.

avergeront
Shopify Partner
2 0 1

This worked as a solution, thank you so much!

Dan-From-Ryviu
Shopify Partner
9171 1836 1870

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.