Re: How to set certain parts of a theme out of sight on PC

Solved

How to set certain parts of a theme out of sight on PC

jihyun_55
Excursionist
15 1 1

I want to set a specific template for the theme out of sight on my PC.

I don't know how to modify the code.😓

Accepted Solution (1)
jihyun_55
Excursionist
15 1 1

This is an accepted solution.

I want to hide the template only on the mobile screen and not on the PC screen.

View solution in original post

Replies 10 (10)

suyash1
Shopify Partner
10712 1324 1699

@jihyun_55 - what do you mean by out of sight?

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

This is an accepted solution.

I want to hide the template only on the mobile screen and not on the PC screen.

suyash1
Shopify Partner
10712 1324 1699

@jihyun_55 - using media queries it can be done, what part do you want to hide on mobile? can you share the website link?

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

https://eu.nakyangyarn.com/products/7easy-mulesing-free

It's one of the products on our website, and I'd like to hide the 'View All Colors' part just above the 'Color Chart' section at the bottom.

I want to set it to be visible on mobile and hidden only on PC.

suyash1
Shopify Partner
10712 1324 1699

@jihyun_55 - please add this css to the very end of your index.css file and check

@media screen and (min-width:750px){
section#shopify-section-template--21750591324434__c09b2bc9-2247-434d-84dc-a58c20c28ffa{    display: none; visibility: hidden;}
}
Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
jihyun_55
Excursionist
15 1 1

Wow! Thank you.
I want to do the same for other products, is there a way to get the name of that section easily?

And I wonder if I just need to copy and paste this code at the bottom of the index.css file and modify the name of the section.

suyash1
Shopify Partner
10712 1324 1699

@jihyun_55 - modifying code can work, this section do not have a common unique class name which can hide this section on all the products, it has accordion name but other products may have other accordions too, if not, then you can try this which will hide all accordions on all products

 

accordeon-container.faq {display: none; visibility: hidden;}
Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
jihyun_55
Excursionist
15 1 1

Is it correct that only the accordion section on the product is hidden? The accordion on the other page should not be hidden.

Is it correct to add this code to the bottom of the Index.css file as well?

suyash1
Shopify Partner
10712 1324 1699

@jihyun_55 - this will hide on all pages and not only product. 

Yes this code too in the end of index.css. 

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

Thank you so much! This has been bothering me for a long time. I feel very refreshed now that I have solved an old problem thanks to you.