Hide empty collapsible tabs in Dawn theme

Topic summary

Users seek to hide empty collapsible tabs/rows in Shopify’s Dawn theme when products have varying numbers of FAQs. Empty tabs currently display as blank lines on product pages.

Initial Solution (Collapsible Content Section):

  • Edit sections > collapsible-content.liquid
  • Wrap content in conditional code checking if heading, row_content, or page.content are not blank
  • This successfully hides empty tabs in the standalone Collapsible Content section

Key Clarification:
The initial solution only works for the Collapsible Content section, not Collapsible Row blocks within product information.

Solution for Product Page Collapsible Rows:

  • Edit main-product.liquid instead
  • Add conditional wrapper inside the ‘collapsible_tab’ case
  • Check if block.settings.content or block.settings.page.content are not blank
  • Multiple users confirmed this approach works

Alternative Theme Solutions:

  • For Archtype Streamline theme: modify tab.liquid by changing “and” to “or” in the conditional logic
  • Users can apply both solutions simultaneously if using collapsible rows in multiple locations

Current Status:
Solution confirmed working with Dawn 15.4.0, with reference link provided for latest implementation.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Hi, hoping someone can help me with this. I’m using the Dawn theme on a store I’m building for a client, but having some trouble with collapsible tabs on the product pages.

Each product has a set of FAQs, but they differ in number. I need to be able to add up to 10 collapsible tabs, but some of the products will only have data in, say, three of them. Is it possible to hide the tabs that are empty? They’re currently showing as empty lines, like this:

Any advice will be much appreciated!

Hi @Bev_StickMkting ,

Please share your store URL and if your store is password protected then please provide password too.

So that we can help you.

Thank you.

Hi @Bev_StickMkting ,

Please go to sections > collapsible-content.liquid file, find ‘section.blocks’ and add code here:

Code:

{%- if block.settings.heading != blank or block.settings.row_content != blank or block.settings.page.content != blank -%}

{%- endif -%}

Hope it helps!

5 Likes

Amazing! Thank you so much, that’s worked perfectly :blush:

1 Like

Hi, sorry but on Dawn theme i don’t have “sections > collapsible-content.liquid”.

how can i do it?

Thanks

MM

Hi @dgallerystore ,

You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.

Hi, I tried using this solution, but it didn’t work.

Using the Dawn theme and did exactly as written. As you can see below I added the code to the correct places, saved it but nothing is happening. What am I doing wrong?

Thanks in advance!

Hi, I’m also having difficulty getting this to work. It seems to work for the collapsible content section but not the collapsible rows within the product information section. Does anyone know how this can be done?

I am also having the same issue

After trying to get this to work for a good 30 minutes I realised the solution wasn’t solving the Collapsible row block on the product page (under the description) but rather the Collapsible content section which is a separate feature. To get this to work for the Collapsible rows you need to edit main-product.liquid and put the condition inside ‘collapsible_tab’ case like so:

Code for easy copy/paste

{%- if block.settings.content != blank or block.settings.page.content != blank -%}
...
{%- endif -%}

Hope this helps someone :grinning_face_with_smiling_eyes:

8 Likes

:folded_hands: Thank you for posting your solution, Baldur! This is exactly what I needed. I’m so close to being able to launch my store now that issue has been resolved. :grin:

Glad I could help :blush: Good luck :raising_hands:t2:

Hi baldur_Helgason,

Thanks for your help.

Cheers.

1 Like

Works like a charm, thanks!
How do I make it so that the entire section is removed if none of the rows has any content?

Thanks in advance!

All the best,
Jacob

We’re using Archtype Streamline theme and the solution for us was a bit different.

We only had to change and to or inside tab.liquid file so that the final thing looks like this:

{%- liquid
  assign output_tab = true
  if title == blank or content == blank
    assign output_tab = false
  endif
-%}

This helped me! In my case I had prefilled headings and I wanted to hide blank rows, so I ended up using only the block.settings.row_content one and it’s working great. Thank you!

FYI to others - this solution works when you use Collapsible Rows in a different “Collapsible Rows Section.” If you’re trying to hide rows in the product information section, you should try the other solutions that modify the main-product.liquid section. I started off with one and then ran out of blocks and so have moved to the other. So I’m actually using both solutions and they seem to be working well.

Perfect thanks :clap:

My guy :smiling_face_with_sunglasses:

This solution works with Dawn 15.4.0, for those who are looking for the current solution: