Customize theme Schema hide and unhide

New Member
3 0 0



On the homepage customize section you are able to create content which you can hide and un-hide like below in red.



I've created a new page called promo with similar sections and I would like for example to hide and un-hide the section called Ometria Form once the promotion as ended.




Is it possible to add the ability to hide content? Possibly some code in the liquid Schema file?

Replies 3 (3)
Shopify Expert
116 11 20

Hi @alice_bambino ,

Yes, it's possible!

You need to add a new section schema code like add one checkbox and add a condition in liquid code.

section schema code :

    'lablel':'Enable section'

for ex;

{% if section.settings.enable_checkbox %}
add your middle content code here...
{% endif %}


If helpful then please Like and Accept Solution. Want to modify or custom changes on store Hire me. Feel free to contact us regarding any help, below our contact listed:
Shopify Expert Page:
Contact us:
Skype: briskdevelopers
7 0 1


The part where is says "add middle code" ... Any directions on how to do this? Greetz! 

New Member
1 0 0

I did try this... maybe I did it wrong. Well, not maybe... I'm sure cuz the result was not the one expected. I did have a different result.

I did this:

for example "image with text overlay" is the hero indication in the section area. 

so I look for the hero.example.liquid... and at the end of it I add:


'lablel':'Enable section'

Then at the ALTERNATIVE page created... inside, on the section after the{{ page.content }} I search for the listed section and put this one in-between the if condition as follows:

{% if section.settings.enable_checkbox %}
{% section 'hero-Example' %}
{% endif %}

  and saved!

but then, what happened was...  that someone works... cuz the section at the public page was not there.... but was not let me put it in public either. Not, if I don't take it out from inside the condition. 

I guess I doing everything wrong... or just something??? what is it?