Re: Hide icon metafields when they are blank

How can I hide blank icon metafields in my theme?

lets_create
Tourist
4 0 1

Hey there! 

 

I am currently trying to hide icon metafields when they are not filled with any media file.

 

Screenshot_1.png

 

Currently, the default icons of the theme are displayed as default unless something is added in the metafield.

 

Screenshot_2.png

 

I have already tried various solutions from the Shopify community, but have not yet found a solution.

Does anyone have an idea to solve this problem?

Many thanks in advance!

Replies 2 (2)

Jason
Shopify Partner
11207 226 2320

What is the code you're using to show them? It's likely in there that you'd add some tweaks.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
lets_create
Tourist
4 0 1

I'm using the Broadcast Theme. I have not integrated any custom code so far, but have only used metafields that are supposed to output a media file.

Other metafields are not displayed if they are empty. That is why I am so confused!