I would like to hide the header, pre-footer and footer from specific pages on my site. I have this code that worked to hide these things on one page:
{% if page.url != ‘/pages/tk’ %}
{% section ‘header’ %}
{% endif %}
However, I would like to hide these items from MULTIPLE pages. How do I do so?
Thanks!!
Hi @bigfoot4x4
This is Noah from PageFly - Shopify Page Builder App
You can continue to use that code with the format like this:
{% if page.url != '/pages/tk' or page.url != '/pages/pages-2' or page.url != '/pages/pages-3' %}
{% section 'header' %}
{% endif %}
Or you can move to use this code to your theme.liquid above the to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the
{% if handle contains '79-racer-stripe-black-adult-hoodie' %}
{% endif %}
To make it work with multiple pages, you just need to add ‘or’ and another condition
Hope this can help you solve the issue
Best regards,
Noah | PageFly
Thanks for the reply! This exact coding did not work, but I switched the “or” to “and” and it did. So thanks for getting me on the right track!
Glad that i can help @bigfoot4x4
Let me know if you have other questions