Shopify themes, liquid, logos, and UX
Hi all,
I want make the mega menu 2nd level child header clickable in Warehouse i.e i want make the Baby Clothes,Games & Toys, Accessories clickable .
Store: https://lesriches.co.uk/
Can anyone help me .
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @lesriches ,
It looks like all the header links on the navigation bar is changed to a h5 tag. This is why the links are not clickable. However, I have written custom JS to fix this. Please follow below steps and let me know if this works.
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
<script>
document.addEventListener('DOMContentLoaded', function () {
const style = document.createElement('style');
style.innerHTML = `
.nav-bar h5 a {
font-family: Satoshi-Bold !important;
}
`;
document.head.appendChild(style);
document.querySelectorAll('.nav-bar .mega-menu__column h5').forEach(function(h5) {
const anchor = document.createElement('a');
const hrefValue = h5.getAttribute('href') || '#';
anchor.href = hrefValue;
anchor.textContent = h5.textContent;
h5.textContent = '';
h5.appendChild(anchor);
});
});
</script>
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
This is an accepted solution.
Hi @lesriches ,
It looks like all the header links on the navigation bar is changed to a h5 tag. This is why the links are not clickable. However, I have written custom JS to fix this. Please follow below steps and let me know if this works.
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
<script>
document.addEventListener('DOMContentLoaded', function () {
const style = document.createElement('style');
style.innerHTML = `
.nav-bar h5 a {
font-family: Satoshi-Bold !important;
}
`;
document.head.appendChild(style);
document.querySelectorAll('.nav-bar .mega-menu__column h5').forEach(function(h5) {
const anchor = document.createElement('a');
const hrefValue = h5.getAttribute('href') || '#';
anchor.href = hrefValue;
anchor.textContent = h5.textContent;
h5.textContent = '';
h5.appendChild(anchor);
});
});
</script>
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025