All things Shopify and commerce
I have a differently designed index page, in which my header is different to the one i want for my product pages ect. i have been working on this for a very long time. I have duplicated my header.liquid file and made a header2.liquid file, in which i want to show on every page but my index page. The problem i have is, I cannot seem to find a way to show the different headers on different pages. I reference 'header' in a {% if template.name == 'index'%} {% sections 'header'%} code (screenshot attached), but it does not show the contents of the 'header.liquid' file, although, it shows it when i use 'header-group' instead of it. This is a problem, as when i use 'header2', it does not show the header2.liquid file, which i need to have. Anyone have a fix for this, or a different word i can use in the {% sections 'header'%} part? THANKYOU!
@premisesdist Hope you are doing well.
Could you please share your store URL? if it is password protected please share the password as well.
only the front page is up right now as the others dont work.
I am also having this same problem. I want a button in my nav on my homepage to have an anchor link down to a certain area on the homepage, but now my other pages won't be able to access the content page from that button. I have everything coded where I need it but cannot use a a different header on the homepage and another across the rest of the pages. Please help.
{% if template.name == 'index' %}
{% section 'header' %}
{% else %}
{% section 'header2' %}
{% endif %}
@Vinsinfo I also tried this – it works fine on desktop, but on mobile the second header / hamburger menu doesn't work at all. How could this be fixed? Thanks!
I'm replying to myself, I got it work! I just needed to update the global.js file as well. 🙂
can you tell us how did you achieve this, i have similar problem.
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