Hide sections on product page based on customer tag - Dawn theme

Topic summary

A merchant using the Dawn theme wants to hide a multicolumn section on product pages for customers tagged as “wholesale.”

Proposed Solutions:

Multiple developers offered similar Liquid-based approaches:

  • Check customer login and tag: Use {% if customer %} to verify login, then check if customer.tags contains “wholesale”
  • Conditional rendering: Wrap the multicolumn section content with {% unless customer.tags contains 'wholesale' %} to hide it for wholesale customers
  • CSS class method: Add a custom CSS class (e.g., hide-wholesale) to the section’s main div, then use Liquid conditionals to toggle display: none or display: block based on the tag

Implementation Steps:

  1. Navigate to Online Store → Themes → Edit Code
  2. Locate multicolumn.liquid or product-template.liquid in the Sections folder
  3. Add conditional Liquid code at the top or before the {% schema %} tag
  4. Optionally add corresponding CSS rules

Status: Multiple working solutions provided; merchant has not confirmed which approach was implemented or if the issue is resolved.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hi @littleroots1 ,

This is Polo from MS Web Designer.

I would love to assist you with your query. Here is the solution:

Add this custom css class on this sections main div class=”hide-wholesale” then you have to add this sort code on product.liquid file

{% if customer %}

  {% unless customer.tags contains 'wholesale' %}

 .hide-wholesale{

Display: block;

}

 {% endunless %} 

{% else %}

 .hide-wholesale{

Display: none;

}

{% endif %}

If you have any doubt, please feel free to ask.

Regards
Polo