Shopify themes, liquid, logos, and UX
I have added a menu on my store blog page. And I am using this condition to add a css class. But it's not working. Please see the screenshoot.
<a class="{% if link.active %}site-nav--active{% endif %}" href="{{ link.url }}">
{{ link.title }}
</a>
Page link here: https://neophytofoods.com/blogs/recipes
Did you find a solution? I'm having the same issue.
This is quite annoying issue, but the solution is very simple, all you have to do, is to make sure the menu link assigned in the navigation settings, is not absolute link that copied/pasted, but make sure to search for the page/product/collection.. and select the object you are after from the link search there, this way shopify can deal with the link as object and then the active attribute will work properly.
Thank you Ahmed!
Welcome, glad i could help!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024