How To Hide Announcement Bar From pages (contact or FAQ)

Topic summary

Goal: hide the announcement bar only on specific pages (Contact, FAQ) in the Trade theme.

Initial attempt via CSS in theme.liquid hid the bar sitewide, which was not desired.

Working approach: add a Liquid condition using page.handle around the announcement bar so it does not render on selected pages. Excluding handles for contact-us and faqs worked for the requester.

Follow-up: requester wanted to also exclude policy pages (Privacy Policy, Refund Policy, Terms of Service). Suggested snippets looping through shop.policies (first comparing the policy object to strings, then policy.title) did not achieve the goal; one version removed the bar from all pages.

Latest update: no confirmed, granular solution for policy pages. A collaborator requested store access to implement. Screenshots were provided to show where to wrap the announcement bar code, but they were not essential to understanding.

Status: partially resolved (Contact and FAQ excluded). Open issue: reliable Liquid logic to exclude Shopify policy pages without affecting other pages remains unresolved.

Summarized with AI on December 28. AI used: gpt-5.

Hello, I want to hide the announcement bar from pages like faq or contact page and I can’t find the announcemet bar template in the theme.liquid.

I’m using the trade theme

store url lawfystore.com

1 Like

Hello @khajjouk

This is Amelia at PageFly - Shopify Advanced Page Builder app.

You can try the following steps I have provided to help you solve the problem you are facing:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file theme.liquid

Step 3: Add code above


Hoping my solution helps you solve your problem.

Best regards,

Amelia | PageFly

Hello Amelia, thanks for the fast reply

yes it is hidden now but from all the pages i just want to hide it from the footer pages not all the pages.

thanks again

Hi @khajjouk

  • Go to Online Store → Theme → Edit code.
  • Find the file Layout/theme.liquid and paste the code below at the bottom of the file.
{% if page.handle == 'contact-us' or page.handle == 'faqs' %}

{% endif %}
1 Like

@khajjouk Please find “announcement-bar.liquid” file and add condition not to render the code on the pages.

  1. Paste below code in the file like below screenshot.
{% assign page_handle = page.handle | strip %}
{% if page_handle != "contact-us" or page_handle != "faq" %}

  1. Close the condition just above the “{% schema %}” line.
{% endif %}

Please let me know whether it works and reach out to me if any other help is needed.


If you are pleased with my solution, kindly show your appreciation by liking it :+1: and designating it as the accepted solution :check_mark: . Your endorsement fuels my dedication to excellence :blush: .

1 Like

Hello @khajjouk

You can try this code instead

{% if page.handle == 'contact-us' or page.handle == 'faqs' %}

{% endif %}
1 Like

it worked thank you, but based on that logic I’ve tried to add privacy policy, refund policy and terms of service but it didn’t work. if you would let me know how to add pages so that if I want to add other pages in the future would be great.

Thanks again

1 Like

Hi @khajjouk

  • Go to Online Store → Theme → Edit code.
  • Find the file Layout/theme.liquid and paste the code below at the bottom of the file.

Add this code for the policy page:

{%- for policy in shop.policies %}
  {% if policy == 'Refund policy' or policy == 'Privacy policy' or policy == 'Terms of service' or policy == 'Shipping policy' %}
  
{% endif %}
{%- endfor %}

Hi @khajjouk

Great to hear that the issue has been resolved! If my assistance was helpful, please consider liking and accepting the solution., feel free to reach out.

nope, didn’t work for the policies

1 Like

Hi @khajjouk

Sorry you can add this code.

{%- for policy in shop.policies %}
  {% if policy.title == 'Refund policy' or policy.title == 'Privacy policy' or policy.title == 'Terms of service' or policy.title == 'Shipping policy' %}
  
{% endif %}
{%- endfor %}

Hi, so i added this code and it removed it from all pages

1 Like

Hi @khajjouk

Please send me your store access and I will implement it.