Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi, I would like to hide custom liquid sections from mobile (roses with new arrivals words)
Can you please help?
Website: https://rayeofhope.com/
password Tristin0805
Thanks
Solved! Go to the solution
This is an accepted solution.
@urbantis - sorry my mistake, did not put # before id, so please remove that line and use this
@media screen and (max-width:749px){
#shopify-section-template--15701762998467__7a98d4cb-9e18-4394-8c8d-88719a04ea9c{
display: none; visibility: hidden;}
}
In the theme editor, go to /sections/custom-liquid.liquid
Find the line with
"settings": [
And below that paste:
{"type":"checkbox", "id":"mobile_hide", "label":"Hide on mobile", "default":true}
Thank you, when I add {"type":"checkbox", "id":"mobile_hide", "label":"Hide on mobile", "default":true}
under setting I get
error saving sections/custom-liquid.liquid
However I would like to hide a specific custom.liquid. not all of them, please let me know if you have time, thanks
@urbantis with my solution you should be able to hide specific custom Liquid sections, not just that specific one.
Sorry I forgot you need to add a comma after the setting.
So:
{"type":"checkbox", "id":"mobile_hide", "label":"Hide on mobile", "default":true},
@urbantis - add this css to the very end of your base.css file and check
@media screen and (max-width:749px){
shopify-section-template--15701762998467__7a98d4cb-9e18-4394-8c8d-88719a04ea9c{
display: none; visibility: hidden;}
}
I tried this adding is at the bottom of base.css but it does not hide the section, what am I doing wrong?
This is an accepted solution.
@urbantis - sorry my mistake, did not put # before id, so please remove that line and use this
@media screen and (max-width:749px){
#shopify-section-template--15701762998467__7a98d4cb-9e18-4394-8c8d-88719a04ea9c{
display: none; visibility: hidden;}
}
Brilliant, thank you