To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more

Disable a Navigation link to a collection

Solved
ByAprilCo
Shopify Partner
33 0 8

Hey guys! 

 

Can anyone guide me to css or code where I can disable the Nav link for a Collection? Essentially I want the Collection link to only trigger the dropdown in the Nav, vs. going to the Collection Group Template/Page.

 

Site here for reference: https://rainbowtoybox.com.au/ / Password: rainbow

 

Nav links: Shop by Brand and Shop by Collection

 

thank you!

Accepted Solution (1)

Accepted Solutions
BSS-Commerce
Shopify Partner
772 115 106

This is an accepted solution.

Hi @ByAprilCo 

You can try our suggestion below:

1. Search "CSS"

view (6).png

2. Scroll down to the end and add the code

.disable-click{
  pointer-events: none;
}

view (7).png

3. Scroll down and add this code like the image

<script>
      let disableClick = document.querySelectorAll(".list-menu li menu-dropdown");
      disableClick[1].querySelector("a").classList.add("disable-click")
      disableClick[2].querySelector("a").classList.add("disable-click")
</script>

view (9).png

If it's useful to you, please let me know by giving a like or marking it as a solution. Also, feel free to contact me if you need any.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
Install B2B & B2C apps to accelerate sales

View solution in original post

Replies 2 (2)
BSS-Commerce
Shopify Partner
772 115 106

This is an accepted solution.

Hi @ByAprilCo 

You can try our suggestion below:

1. Search "CSS"

view (6).png

2. Scroll down to the end and add the code

.disable-click{
  pointer-events: none;
}

view (7).png

3. Scroll down and add this code like the image

<script>
      let disableClick = document.querySelectorAll(".list-menu li menu-dropdown");
      disableClick[1].querySelector("a").classList.add("disable-click")
      disableClick[2].querySelector("a").classList.add("disable-click")
</script>

view (9).png

If it's useful to you, please let me know by giving a like or marking it as a solution. Also, feel free to contact me if you need any.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
Install B2B & B2C apps to accelerate sales
ByAprilCo
Shopify Partner
33 0 8

Absolute Legend!!! Thank you so soooo much!