To display descriptions for products in specific collections while excluding others, you can use a conditional statement in your code. Here’s a general approach:
Identify the Collection: You’ll need the collection handle (a unique identifier for your collection). You can find this in your Shopify admin under the collections section.
Add Conditional Logic: In your code where you’re displaying product descriptions, add a conditional check for the collection handle. Here’s a sample code snippet:
liquid
Copy code
{% if collection.handle == ‘your-specific-collection-handle’ %}
{{ product.description }}
{% endif %}
Replace ‘your-specific-collection-handle’ with the actual handle of the collection where you want descriptions to appear.
For Multiple Collections: If you want to include descriptions for multiple collections, you can use the or operator:
liquid
Copy code
{% if collection.handle == ‘first-collection-handle’ or collection.handle == ‘second-collection-handle’ %}
{{ product.description }}
{% endif %}
Placement: Make sure to place this code where the product information is being rendered in your theme.
This way, descriptions will only show for products in the specified collections. If you have more collections, you can continue adding them in the conditional logic.