Removing announcement bar from custom wholesale page

I used the following to create a custom wholesale customer area: https://alanryan.dev/tips/members-page/

As it is used for wholesale clients, I don’t want the announcement banner displayed when someone signs in with the customer tag ‘wholesale’.

The page was set up using a page.wholesale.json template…

I cannot figure out how to remove the announcement bar.

Also, would love to change the header menu so it is green on this page only.

Thanks in advance!

@TRUENOSH

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

Hello @TRUENOSH

Try to check where the announcement bar code has been kept. Maybe in header.liquid file or a separate announcement-bar.liquid file.

Add below condition above the start of the announcement bar section

{% unless template contains ‘page’ and template.suffix contains ‘wholesale’ %}

and close the condition by

{% endunless %}

below the end of the announcement bar section.

Hope it helps you. Let me know if you face any issues.

www.truenosh.com

This is what I tried, with your suggestion bolded… it didn’t work. It is in announcement-bar.liquid. Please let me know if it was done correctly.

{% unless template contains ‘page’ and template.suffix contains ‘wholesale’ %}
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when ‘announcement’ -%}

{%- endcase -%} {%- endfor -%} **{% endunless %}**

@TRUENOSH

if possible to send theme zip code

@TRUENOSH

I have checked and there is no announcement on wholesale page

Can you tell me where else you want to hide announcement bar.