CherylTeo Posted August 10, 2021 Posted August 10, 2021 Site URL: https://www.lulopaperstudio.com/shop Hello, I would like to hide my items that I'm listing for sale from the main shop page. But, have it still accessible/visible when users click on the "sale" link. Link to the item I want to hide on the main shop page: https://www.lulopaperstudio.com/shop/p/christmascards I am not familiar with custom CSS, any help would be appreciated! :)
tuanphan Posted August 12, 2021 Posted August 12, 2021 On 8/10/2021 at 2:33 PM, CherylTeo said: Site URL: https://www.lulopaperstudio.com/shop Hello, I would like to hide my items that I'm listing for sale from the main shop page. But, have it still accessible/visible when users click on the "sale" link. Link to the item I want to hide on the main shop page: https://www.lulopaperstudio.com/shop/p/christmascards I am not familiar with custom CSS, any help would be appreciated! :) Hi. Can you take a screenshot of products you want to hide? https://www.lulopaperstudio.com/shop Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
CherylTeo Posted August 18, 2021 Author Posted August 18, 2021 On 8/12/2021 at 3:46 PM, tuanphan said: Hi. Can you take a screenshot of products you want to hide? https://www.lulopaperstudio.com/shop Hi Tuan, Here is a screenshot of what I want to hide from the main shop page. But, it should still be accessible when I click on the link "sale".
tuanphan Posted August 22, 2021 Posted August 22, 2021 On 8/18/2021 at 12:40 PM, CherylTeo said: Hi Tuan, Here is a screenshot of what I want to hide from the main shop page. But, it should still be accessible when I click on the link "sale". Hi, Add to Design > Custom CSS /* Hide product from shop page */ @media screen and (max-width:767px) { div#thumb-christmascards { display: none; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
CherylTeo Posted August 23, 2021 Author Posted August 23, 2021 On 8/22/2021 at 10:13 AM, tuanphan said: Hi, Add to Design > Custom CSS /* Hide product from shop page */ @media screen and (max-width:767px) { div#thumb-christmascards { display: none; } } Hi Tuan, I tried adding this to custom CSS but it still shows the item on shop page. 😞
tuanphan Posted August 23, 2021 Posted August 23, 2021 4 hours ago, CherylTeo said: Hi Tuan, I tried adding this to custom CSS but it still shows the item on shop page. 😞 Sorry, forgot, the code run on mobile only. Use this new code div#thumb-christmascards { display: none; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
CherylTeo Posted August 23, 2021 Author Posted August 23, 2021 57 minutes ago, tuanphan said: Sorry, forgot, the code run on mobile only. Use this new code div#thumb-christmascards { display: none; } Hi Tuan, Item does disappear from shop page, but when I click on 'Sale' link.. the item is also not there. I want the item to disappear from shop page but be available on sale page. How can I ensure it appears on the 'sale' page? With this code, if you go to my link: https://www.lulopaperstudio.com/shop/sale, the item is also not there anymore.
tuanphan Posted August 26, 2021 Posted August 26, 2021 Try this new code (Code Injection > Footer) <style> div#thumb-christmascards { display: none; } body.sale div#thumb-christmascards { display: block !important; } </style> <script> if (document.location.pathname.indexOf("/shop/sale") == 0) { document.querySelector('body').classList.add('sale') } </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
CherylTeo Posted August 27, 2021 Author Posted August 27, 2021 19 hours ago, tuanphan said: Try this new code (Code Injection > Footer) <style> div#thumb-christmascards { display: none; } body.sale div#thumb-christmascards { display: block !important; } </style> <script> if (document.location.pathname.indexOf("/shop/sale") == 0) { document.querySelector('body').classList.add('sale') } </script> Awesome! Thank you so much Tuan! This works perfectly and exactly what I needed. Appreciate all your help, you have been a true gem!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.