Hiding a collection programatically from the Catalog page

I want to use an if statement to check if a collection is “Creations” and prevent it from being displayed in the Catalog/store. I want to use this collection as a set of images to display on a custom page (I’ll remove the add to cart and price in the template as well). Thank you for any help! I am using the Debut theme. I feel like I am close with if collections.title = “Creations” but I cannot get it to work.

Hi @tscanlan

Instead of this you can use

{% if collection.title conatins 'collection name ’ %}

your code here

{% endif %}

If you have again issue with this so you can contact me on skype ( skype id : cid.6072cc42f2bf365c).

Thanks.

Hi @tscanlan

Aibek is here from Speedimize.io

You write this wrong, it should be like this:

{% if collection.title == “Creations” %}
code here
{% endif %}

You specified collections in the plural. Plus, when comparing, you must specify ==

I set a product type as “nodisplay” and I used {% if product.type != ‘nodisplay’ %} to skip over displaying those products in the “Catalog.” The products labeled with “nodisplay” do not show up as expected but I am having a problem. The store displays only 7 photos (it would be 8 minus the 1 hidden product) and says “Sorry, there are no products in this collection.” (see image)

I want to remove a collection from the global object with something like: {% collection remove: ‘/collections/creations’ %} but I don’t know what that syntax would be

How can I keep this product type from showing up and also stop from breaking the store?

My pieces of code I have bolded to make them easier to find: