Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
Is it possible to hide specific products from main collection pages?
For example I have 4 different colours split into individual products, but only want to show 1 colour on the main collection pages & allow the user to toggle through these on the individual product page itself. We have quite a lot of products so having these all showing on main collection pages can lead to 50-100 pages which isn't ideal.
Something like a visible on product pages but not collection pages option on publishing settings?
Thanks
Hi, you can create a manual collection or an automated one. In the first case, you can choose products and in the second one you can make your custom filters - tags for example. So you can tag your product with a "hidden" tag and set the collection not to display products with this tag.
Thanks this has worked. The only issue I have is the product per page is still classing those with the tag present even though they aren't showing, so a 36 product per page is showing about 14. How can I change this?
Are you sure you used my resolution? Try to set it inside CMS, collection settings using automated collection type, not in the liquid file. It should count products correctly.
Hello @danielmonk , You can use product tags to hide the products on the collection page.
1. Assign a unique tag to the products you want to hide. For instance, you can use the tag "hide-in-collection."
2. Modify the collection section file where the product grid is rendered by adding the following condition:
{% unless product.tags contains "hide-in-collection" %}
{% render 'card-product' %}
{% endunless %}
Thanks this has worked. The only issue I have is the product per page is still classing those with the tag present even though they aren't showing, so a 36 product per page is showing about 14. How can I change this?
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025