A user encountered an issue where metafields for Dietary Preferences and Allergen Information displayed headings and bullet points but no actual text content in the Shopify Dawn theme. The metafields were configured using Shopify’s standard metafield/metaobject definitions with predetermined answers.
Problem identified:
The original Liquid code attempted to access values using preference.fields["label"], which was incorrect for the metafield structure being used.
Solution provided:
Multiple working code alternatives were shared, including:
Using metafield_text or metafield_tag filters
Accessing the label directly via preference.label or preference["label"] without the .fields property
Simplified loop structure: {% for preference in product.metafields.shopify.dietary-preferences.value %}
Resolution:
The user confirmed the corrected code worked successfully, resolving the display issue.
Summarized with AI on October 28.
AI used: claude-sonnet-4-5-20250929.
This is what I get for the Dietary Preferences and Allergen Information for metafields under the DAWN theme.
These are already set up under Shopify with predetermined answers, but this is how it is showing when I preview (no words)
Have tried the assistant and we just go round and round with different coding and the problem isn’t fixed, tried support and apparently they arn’t trained in coding. So I’m stuck. I have two other fields I set up myself which are fine, its just these two. Thanks
If the metafileds data not showing correctly in Shopify then there maybe a potential issue causing this. If did code for it then can you share it with me so that I take a look and make it error free so that it works well.
Well, the fact that it outputs the title and a bunch of dots means that code sees the metafield, it’s a list type MF and code can see the values. However, code outputs nothing inside
tags and this is where screenshot of your MF definition (and metaobject definition, if your MF refers to metaobjects ) would be helpful.
Your original code can be modified like this – it is very similar to the previous code. You can use either {{ preference.label }} or {{ preference[“label”] }}, not .fields needed:
{% if product.metafields.shopify.dietary-preferences %}
### Dietary Preferences
{% for preference in product.metafields.shopify.dietary-preferences.value %}
- {{ preference["label"] }}
{% endfor %}
{% endif %}