Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Collapsible tabs in the Expanse theme - how to have a tab open by default?

Collapsible tabs in the Expanse theme - how to have a tab open by default?

laurenjg
Visitor
1 0 2

Hello all! 👋

 

Hoping someone has encountered this problem before... my Shopify store is on the Expanse theme. 

 

On my product pages, I have a couple of collapsible/accordion tabs that are hidden by default (i.e. the user has to click the down arrow to expand the tab and view the info).

 

I'd like one of the tabs to be open by default – i.e. the user doesn't need to click to collapse, the info is visible by default. 

 

Does anyone have any idea how to do this in the Expanse theme? I've seen multiple solutions for the Dawn theme but can't seem to find anything for Expanse.

 

Thanks in advance!

Reply 1 (1)

Liz_CS
Tourist
5 1 0

I found this question while trying to solve this myself and it may be too late but I figured it out! 

 

Go to Edit Code>snippets/tab.liquid

at the top of the page above {% if output_tab %} replace that code with this:

 

{%- liquid
assign output_tab = true
if title == blank and content == blank
assign output_tab = false
else
if title == "[name of your tab here]"
assign force_open = true
endif
endif
-%}