EU compliance5 min read
Shopify Metafields Not Showing on Product Page? Fix It Without Liquid
Nutrition or allergen metafields show a heading but no value? Learn the usual causes and how to skip the Liquid hacks with a no-code food label block.
In this guide
- Why your metafields show a heading but no value
- A quick checklist before you touch any code
- Why metafields are a fragile way to show food information
- The no-code alternative: fill in one form, add one block
- What this does not do
- When to keep fixing metafields, and when to move on
- Show your food information without Liquid
You filled in the nutrition values and allergens for a product. You added a heading, maybe a bullet list, to the product page. On the storefront you see “Allergens:” and an empty bullet, or a “Nutrition” tab with nothing inside.
If your Shopify metafields are not showing on the product page, the cause is almost always small and fixable. This guide covers the usual culprits first. Then it covers a route that skips the Liquid and the dynamic-source wiring, which matters if you sell food and have to show this information.
Why your metafields show a heading but no value
The heading and bullet come from the theme. The value comes from a separate lookup. When the lookup finds nothing, the theme still draws the surrounding markup. That is why you see the label but not the content.
These are the most common reasons the lookup comes back empty.
1. The metafield is on a different resource
A metafield can belong to the product, to the variant, or to another resource. If you typed values on the variant but the block reads the product metafield, it finds nothing. Check where you entered the data and where the block is reading it from.
2. The namespace and key don’t match
In custom Liquid, the reference looks like product.metafields.custom.allergens. A single typo, or a different namespace than the one in your definition, returns blank. Compare it character by character with the definition under Settings > Custom data.
3. The value type needs different output
Some types don’t print as plain text. Rich text, lists and references need specific handling in the theme. A list may print as an empty bullet if the code expects a single line of text. A rich text field may show nothing if the theme treats it as a string.
4. The product simply has no value yet
If you filled in the metafield on a few products and the template is shared by all of them, the others show the heading with nothing under it. Check the product that looks empty before you change any code.
5. The theme block isn’t connected to the field
In the theme editor, a text block can be connected to a dynamic source. If no source is selected, or it points at a field that is empty for that product, the block renders blank.
6. You’re looking at a different template
If the product uses an alternate template, the block you edited may not be on it. Open the exact product in the theme editor and confirm the block is on that template.
A quick checklist before you touch any code
- Open one product that shows the problem and confirm the metafield actually has a saved value.
- Confirm whether the data sits on the product or on the variant.
- Open the theme editor on that same product and check the block’s dynamic source.
- Compare the namespace and key in your code with the metafield definition.
- Check the value type, especially for lists and rich text.
- Save, then reload the product page in a private window to rule out cached content.
Often one of these fixes it. If you need to go deeper, with Liquid debug lines and the right code for each type, our guide to nutrition and allergen metafields not showing walks through it step by step.
But for food, there is a bigger problem than one empty field.
Why metafields are a fragile way to show food information
A nutrition table needs several rows: energy, fat, saturates, carbohydrate, sugars, protein and salt. Ingredients need allergens emphasised. Regulation (EU) No 1169/2011 asks for this information, and it has to be easy for the buyer to read before they buy. Our guide to EU allergen information for online food shops covers the rules.
With plain metafields you end up with:
- one field per nutrient, or one big text blob you format by hand
- Liquid to turn the allergens in your ingredient text into bold
- headings typed into the theme, which stay in one language
- code that has to survive every theme change
Each piece is another place for a value to go missing. Many shop owners then give up and upload an image of the label. An image can’t be read reliably by search engines or screen readers, and you have to remake it whenever the recipe changes.
The no-code alternative: fill in one form, add one block
Instead of repairing the wiring field by field, you can enter the food information once per product and let a theme block display it. With Etiketto: EU Nutrition Labels the flow is:
- Fill in one form per product. Enter the nutrition per 100 g, the ingredients and the operator details. The values come from your own specification or lab results.
- Mark the allergens. Wrap each allergen in asterisks in the ingredient list, for example
oat flakes, honey, *butter* (*milk*). The marked words show in bold on the product page. - Add one block. In the theme editor, add the Food information block to the product template of your Online Store 2.0 theme, pick a layout (table, accordion, compact or card) and save. No Liquid edits and no dynamic source to connect.
The nutrition table, the ingredients with allergens in bold and the operator then show on the product page as plain HTML text, not an image. There are no namespace and key strings to mistype in theme code, because the app owns both the data and the block that reads it.
If you sell in more than one language, the label wording comes in 10 languages, and your own text can be translated into any published store language. Our guide to showing allergens in your store’s languages explains how.
What this does not do
It is a display tool. It does not calculate nutrition values from a recipe, and it does not detect allergens: only the words you mark are bold. What you enter decides what the buyer sees, so you are responsible for it being correct and complete for your products. If you’re unsure what your products must show, check with a food-law adviser or your local food authority.
When to keep fixing metafields, and when to move on
If you have one or two simple text fields and the checklist above solves it, keep your setup. If you’re building nutrition tables, bold allergens and translations out of metafields and Liquid, the fix may break again the next time you add a product, change the recipe or switch themes. That is the point to move the food information out of theme code.
Show your food information without Liquid
Etiketto: EU Nutrition Labels is an app for food shops selling into the EU. It shows the food information Regulation (EU) No 1169/2011 requires on your product pages: a nutrition table, ingredients with allergens in bold, and the operator.
Install Etiketto: EU Nutrition Labels from the Shopify App Store, fill in your first product, and add the Food information block to your product page.