Remove Header, Footer & Announcement Bar from Collection Page and the product page

Hello,

I am currently using Refresh Version 9.0, And I wanted to remove the Header, Footer and the announcement bar from my collection page. When customers click on the link, I don’t want them to see any of these on this specific page only. I also wanted it gone from the product pages also that are in this collection.

https://snackbox.canteen.com/collections/fgcu

Here is the link to the page, is this something I can do is there a specific code I have to enter, I dont know the code or where to enter it. If I can be guided on how to achieve that would be amazing!

Thank you,

dmccall10

To remove the header, footer, and announcement bar from your collection page and the product pages within that collection in Shopify’s Refresh theme version 9.0, you’ll need to make some code changes. Here’s how you can achieve this:

  1. Access the theme code: In your Shopify admin, go to Online Store > Themes. Find the Refresh theme version 9.0 and click on the “Actions” button, then select “Edit code” from the dropdown menu.

  2. Locate the collection template: In the code editor, navigate to the “Sections” folder and look for the “collection-template.liquid” file. Click on it to open the file.

  3. Remove the header and footer: Within the “collection-template.liquid” file, find the code that generates the header and footer sections. It usually starts with {% section 'header' %} and {% section 'footer' %}. Delete or comment out these lines of code to remove the header and footer from the collection page.

  4. Remove the announcement bar: To remove the announcement bar specifically from the collection page, locate the code responsible for displaying the announcement bar. It might be located in the “theme.liquid” or “sections” folder. Look for code like {% include 'announcement-bar' %} or similar. Delete or comment out this line to remove the announcement bar.

  5. Update the product template: If you want to remove the header, footer, and announcement bar from the product pages within the collection as well, you’ll need to modify the “product-template.liquid” file. Follow the same steps as above to remove the corresponding code blocks from this file.

I cant seem to find those exact folder, I only see my collection in a json folder

yes there will section file in that collection.json file

Hi @dmccall10

I hope you are doing good and welcome to the Shopify Community!
I am San from MS Web Designer.

Please add this liquid in your theme.liquid file before the tag:

{% if template == ‘collection’ %}

#shopify-section-sections–15520727335044__announcement-bar, .header-wrapper, .footer {display: none !important;}

{% endif %}

{% if template == ‘product’ %}

#shopify-section-sections–15520727335044__announcement-bar, .header-wrapper, .footer {display: none !important;}

{% endif %}

Regards,

San

I cant seem to find the tag in the theme.liquid folder

I als tried to add it to the base.ccs folder and it took the banners off of every page.

Hi @Dmccall10,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the ⇒ save

{% if template contains 'collection' or template contains 'product' %}

{% endif %}

Hope my solution works perfectly for you.

Cheers!

Oliver | PageFly

1 Like

Hi @dmccall10

If you can’t find the tag in the theme.liquid file then you you can find it on header.liquid file.

Thank you Oliver!!!

This worked for me using the Broadcast theme. I wanted a template for landing pages without any navigation and distractions and tried sooo many other solutions and tweaks and absolutely nothing worked until I tried Oliver’s solution. It worked for the header and footer but not for my announcement bar which instead seems to be called ‘ticker-bar’. For anyone interested this is what finally removed announcement, header and footer in the Broadcast theme:

{% if template contains ‘insert-template-name’ %}

ticker-bar, header, footer {display: none !important;}

{% endif %}

Step by step this is what I did:

  1. Created a new template (in this case based on the lookbook template under pages).

  2. Created a new page and assigned my new template to that page.

  3. Pasted the above in the theme.liquid file above the tag. (Remember to put your own template name instead of ‘insert-template-name’).

Anyway, I hope this can maybe save someone else half a day of frustration :wink: