Minimal theme make change to product-grid-item if collection name/title == 'collection_name'

Highlighted
Tourist
7 0 1

Hello, 

I'd like to make changes to the product-grid-item.liquid code IF collection has a certain name, title, or handle. I've tried to use  {% if featured.title == '' %} as well as collection handle and title. None seem to work. If there is a way to get these to work to edit code if in a specific collection on homepage, let me know of a solution. Thanks!

Here's my code right now (in product-grid-item.liquid):

 {% if featured.title != 'Free CloudShare Items' %}
       
         <p class="grid-link__meta">
          
           
           {% else %}
<style>
  
 .grid-link__meta { 
 display: none block;

}
</style>
    
    
     <h6 style="color:#12c5ff;"><strong>FREE</strong></h6>
    
    
   {% endif %}

 

0 Likes