How to make my shop link in the header work again?

Solved

How to make my shop link in the header work again?

GoombaGrows
Explorer
42 1 9

Hello,

 

After making my SHOP navigation a drop down it no longer takes you to the all products page. Any fix for this?

 

Thanks in advance!

 

GoombaGrows_0-1740540549338.png

 

Link: https://qz26pn-cv.myshopify.com/

Password: bagono

Accepted Solution (1)

DaisyVo
Shopify Partner
4275 467 561

This is an accepted solution.

HI @GoombaGrows 

 

In order to fulfill your request, please follow these steps


Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body>

 

<srcipt>
document.addEventListener("DOMContentLoaded", function () {
    const shopMenu = document.getElementById("HeaderMenu-shop");
    if (shopMenu) {
       shopMenu.addEventListener("click", function (event) {
          event.preventDefault();
          window.location.href = "/collections/all";
       });
   }
});
</script> 

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 4 (4)

sakib_ShopiDevs
Shopify Partner
16 1 2

You can rename "Shop" to "Category" and create a new item named "Shop" with a link to "All Collections." Otherwise, you will need to modify the code.

Found it helpful? Please like and mark the solution that helped you.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers
GoombaGrows
Explorer
42 1 9

Modifying the code is definitely what I'm looking for then. Thank you for your quick response.

DaisyVo
Shopify Partner
4275 467 561

This is an accepted solution.

HI @GoombaGrows 

 

In order to fulfill your request, please follow these steps


Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body>

 

<srcipt>
document.addEventListener("DOMContentLoaded", function () {
    const shopMenu = document.getElementById("HeaderMenu-shop");
    if (shopMenu) {
       shopMenu.addEventListener("click", function (event) {
          event.preventDefault();
          window.location.href = "/collections/all";
       });
   }
});
</script> 

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
GoombaGrows
Explorer
42 1 9

This worked! Thank you so much 🙂