What's your biggest current challenge? Have your say in Community Polls along the right column.

How to hide Shopify section on Desktop & Mobile Devices?

How to hide Shopify section on Desktop & Mobile Devices?

Brian-A
Excursionist
42 0 11

How to hide Shopify section on Desktop & Mobile Devices? 

 

How would I hide a custom liquid section on mobile and desktop devices? I need one section for mobile devices and one section for desktop devices, reason being image adjustment.

Image on Mobile device needs to be custom compared to desktop and I just want to have 2 separate liquids. 

Replies 2 (2)

suyash1
Shopify Partner
10203 1260 1600

@Brian-A - using css you can hide/show the section you want, need to get the ids of those sections

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.

theycallmemakka
Shopify Partner
1746 424 443

Hi @Brian-A ,

 

For this you can custom CSS. You can follow below steps to show/hide sections on different device.

 

Step 1: Go to the section you want to show/hide. 

Step 2: Add below code on custom CSS.

theycallmemakka_0-1731900112930.png

To hide on mobile, add bellow css:

 @media only screen and (max-width: 768px) {
*{
display: none;
}
}

 

To hide on desktio, add bellow css:

@media only screen and (min-width: 769px) {
*{
display: none;
}
}

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com