Depending on theme it may actually be current_product or some other alias variable the theme uses in collection templates when looping over products, or it uses ajax, or does not use product_card .
There’s also being sure products do not actually contain that string not just the word , so brassware would also match as a type of false negative.
I put this code right above: {% include ‘product-price-listing’, product: product, show_vendor: show_vendor %} as this is where I want the image to show in the snippet: product.card.grid.liquid.
But it did not exclude the brass jewellery collection. The image showed up under all products in the collection page.
While that’s a good attempt there’s a catch with handles in that they get “handleized” which is the name as you see it in that collections url
so brass jewellery collection becomes brass-jewellery-collection with dashes(-) and thus may not be a match when using the contains operator as you want to be less specific.
Using just contains would be more like {% unless collection.handle contains ‘brass’ %}