Shopify themes, liquid, logos, and UX
I have a wholesale section in my website and when a customer is tagged 'wholesale' they can only view the wholesale menu. However, the search bar is still visible and it only returns 'retail' results, so I would prefer to hide it.
I'm happy to edit the code if anyone has a suggestion on how to do that!
TIA:)
Dawn 15.0.2
Solved! Go to the solution
This is an accepted solution.
Hi @Smeelah ,
To hide the search bar for customers tagged as 'wholesale', follow these steps:
1. Go to Online Store > Themes.
2. Click on Actions next to your current theme and select Edit code.
3. In the code editor, find the header.liquid file, typically located under the Sections folder.
4. Locate the header-search by searching for it in the header.liquid file.
5. Replace the existing code for the search bar with the following:
{% unless customer.tags contains 'wholesale' %}
{% render 'header-search', input_id: 'Search-In-Modal' %}
{% endunless %}
Refer Screenshot:
5. Click Save to apply the changes.
This code ensures that the search bar is only displayed to customers who are not tagged as 'wholesale'. For customers tagged as 'wholesale', the search bar will be hidden.
If you need further assistance, feel free to reach out!
I hope this helps! If it does, please like it and mark it as a solution!
Regards,
Sweans
This is an accepted solution.
Hi @Smeelah ,
To hide the search bar for customers tagged as 'wholesale', follow these steps:
1. Go to Online Store > Themes.
2. Click on Actions next to your current theme and select Edit code.
3. In the code editor, find the header.liquid file, typically located under the Sections folder.
4. Locate the header-search by searching for it in the header.liquid file.
5. Replace the existing code for the search bar with the following:
{% unless customer.tags contains 'wholesale' %}
{% render 'header-search', input_id: 'Search-In-Modal' %}
{% endunless %}
Refer Screenshot:
5. Click Save to apply the changes.
This code ensures that the search bar is only displayed to customers who are not tagged as 'wholesale'. For customers tagged as 'wholesale', the search bar will be hidden.
If you need further assistance, feel free to reach out!
I hope this helps! If it does, please like it and mark it as a solution!
Regards,
Sweans
Thank you! It works perfectly.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025