Hide specific products from main collection pages

Hide specific products from main collection pages

danielmonk
Shopify Partner
4 0 0

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

Replies 5 (5)

lynth
Shopify Partner
82 3 7

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.

If my tips are useful, just mark it as the solution. Cheers!
Feeling grateful? Buy me a coffee!
danielmonk
Shopify Partner
4 0 0

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?

lynth
Shopify Partner
82 3 7

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. 

If my tips are useful, just mark it as the solution. Cheers!
Feeling grateful? Buy me a coffee!

Rishihuptech
Shopify Partner
676 126 135

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 %}

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
danielmonk
Shopify Partner
4 0 0

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?