How can I assign metafields only to certain products?

I want to utilize the metafields available in the Dawn theme, but I don’t want the metafields applied to every single product. How can I hide them from certain products that they don’t apply to? For example, I don’t need my “scent notes” collapsible row to display for a home decor item, just for the candles. I’ve been looking everywhere and can’t figure it out.

Hi @bk33

if you have coded metafield product wise then you can make condition for that , like if metafield empty then dont generate tab, so you can keep empty metafield for that product sand tab will not generate for that products.

{% if product.metafields.your_namespace.your_key != blank %}
   

metafield has a value: {{ product.metafields.your_namespace.your_key }}

{% endif %}

Thanks for the reply. Where would I add that in?

HI @bk33

This is just syntax how you can make condition with your existing meatfield to make it product specific.

you can add your metafield code with this to make condition and add only metafield value to that product in which you want to display it

Best regard