I want to take this collection of the collection list only on mobile because it’s uneven:
My URL is cheffings.net
Issue: A user wants to hide a specific collection button from their collection list on mobile devices because it creates an uneven layout.
Solutions Provided:
Solution 1 (theycallmemakka):
</body> tag{% if collection %} block to target the specific collectionSolution 2 (Dan-From-Ryviu):
@media (max-width: 749px) to target mobile devicesdisplay: none !important to hide collection list items with specific href attributesStatus: The discussion remains open with two different CSS-based approaches offered. Both solutions use mobile-specific targeting but differ in implementation method (theme.liquid vs. Custom CSS panel).
I want to take this collection of the collection list only on mobile because it’s uneven:
My URL is cheffings.net
Hi @lukafernada ,
Follow these Steps:
{% if collection %}
{% endif %}
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
Hi @lukafernada
You can add this code to Custom CSS in Online Store > Themes > Customize > Theme settings.
@media (max-width: 749px) {
li.collection-list__item.grid__item:has(a[href="/collections/other-kitchenware"]) {
display: none !important;
}
}