How can I change the active menu color in the impulse theme

Hi,

I am using the impulse theme and there is no option to change the color of an active menu link.

Need to enable this for both Header and Footer menus.

Can you guys help me do this please?

Thanks,

Hey @MKsac

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

Please check the bellow link

https://pii9kzmodgws3iew-68671242419.shopifypreview.com

Thanks.

Hey @MKsac

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

  1. Open Online Store > Themes > Actions > Edit code.
  2. Locate the main JavaScript file (often named theme.js, main.js, or similar). If unsure, you can also add this script in the theme.liquid file inside a tag:
document.addEventListener("DOMContentLoaded", function() {
    // Select all menu links
    const menuLinks = document.querySelectorAll(".site-nav__link");
    const currentPath = window.location.pathname;

    // Loop through each link and check if it matches the current URL
    menuLinks.forEach(link => {
        if (link.href.includes(currentPath)) {
            link.classList.add("active");
        }
    });
});
​
  • Add the following CSS to your theme’s main CSS file (e.g., theme.css, style.css, or custom.css):
/* Active menu link styling */
.site-nav__link.active {
    color: #FF5733 !important; /* Replace with your desired color */
    font-weight: bold; /* Optional: Make it bold */
    text-decoration: underline; /* Optional: Underline the link */
}

/* Optional: Active state for dropdown links */
.site-nav__dropdown .site-nav__link.active {
    background-color: #f0f0f0; /* Highlight dropdown active link */
}
​
  • Save your changes.
  • Refresh your Shopify site.