Removing header/footer from several pages all on one template

Hi!

I am attempting to remove the header and footer from a series of pages on my site, but not on the entire site. I created a special template just for these pages hoping it would make the coding a bit simpler. However, when I create if or unless code statements, it is still removing the header and footer from my entire site, not only the pages in the template.

Here is what I have attempted so far:

{% if template == template.gather %}
{% sections ‘header-group’ %}
{% endif %}

{% if template == template.gather %}
{% sections ‘footer-group’ %}
{% endif %}

{% unless template == template.gather %}
{% sections ‘header-group’ %}
{% endunless %}

Hi!

I am attempting to remove the header and footer from a series of pages on my site, but not on the entire site. I created a special template just for these pages hoping it would make the coding a bit simpler. However, when I create if or unless code statements, it is still removing the header and footer from my entire site, not only the pages in the template.

Here is what I have attempted so far:

{% if template == template.gather %}
{% sections ‘header-group’ %}
{% endif %}

{% if template == template.gather %}
{% sections ‘footer-group’ %}
{% endif %}

{% unless template == template.gather %}
{% sections ‘header-group’ %}
{% endunless %}

{% unless template == template.gather %}
{% sections ‘footer-group’ %}
{% endunless %}

Neither of these do anything but remove the header and footer from the whole site. Can anyone help me only remove it for the pages I used the template on?

Here is my site currently: www.kindletogetherness.com

The pages I need to remove the header/footer from are currently hidden until I remedy this.

Thanks in advance!

Hi @SarahRuth

This is Victor from PageFly - Shopify Page Builder App

In this case you can change your condition by using this

{% if handle contains 'gather' %}

{%endif%}

{% if template.name == 'gather' %}

{% endif %}

Hope this can help you solve the issue

Best regards,

Victor | PageFly

Hello Victor,

Thanks for this. However, the coding you shared also removes the header and footer from the entire website.

Hi @SarahRuth Please share with me the URL that you want to hide the footer, i will give the condition for you

Thanks for offering this, Victor. It is a total of 6 pages at the moment.

https://kindletogetherness.com/pages/gather

https://kindletogetherness.com/pages/gather-adventure-club-story

https://kindletogetherness.com/pages/gather-members-only-page

https://kindletogetherness.com/pages/gather-registration

https://kindletogetherness.com/pages/gather-core-values

https://kindletogetherness.com/pages/the-details