Looking to hide Meta Fields that contain no data in Empire theme

TileTools-1
Visitor
3 0 0

I am adding custom Metafields to my site and not all products are applicable - I am using the Empire theme  any help would be appreciated
https://tiletools.com/products/gundlach-red-urethane-grout-float

Reply 1 (1)

Developer-G
Shopify Partner
3079 604 857

Hello @TileTools-1 ,

 

With liquid you can make the metafields conditional 

e.g.

{% if product.metafields.namespace.key != blank %} 
  {{ product.metafields.namespace.key }} 
{% endif %}

 

Or you can write a script which will check if there is content available for the tab or not.
If not then use hide the parent element.

 

Hope it will give you an idea to write code a/to your needs.

 

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter