Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're using Impulse version 7.3. I have the following code used to display custom metafields from Collections. (This is working, except for the piece below)
{% if collection.metafields.custom.collection_bottom_description_1 != blank %}
{{ collection.metafields.custom.collection_bottom_description_1 }}
{% endif %}
BUT when they're blank, it's populating the default "This section doesn't currently include any content. Add content to this section using the sidebar."
If these fields are blank, I simply want these boxes to disappear, and not display this message.
How can I fix this?
Hi @elizklein Try either: an empty space character " ", or a dot or special hidden ascii character so the metafield is not technically blank.
Or slightly different logic
{% if collection.metafields.custom.collection_bottom_description_1 != blank %}
{{ collection.metafields.custom.collection_bottom_description_1 }}
{% else %}
{%- comment %}This else has a hidden hair-width whitespace character from https://www.namecheap.com/visual/font-generator/whitespace/{% endcomment %}
{% endif %}
Otherwise the theme may need to be customized to change how the placholder onboarding content logic works.
If you need this customization then contact me by my email for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025