Help! Metafields doesn’t appear when im adding it to my Spotlight theme

Help! Metafields doesn’t appear when im adding it to my Spotlight theme

jsllp
Tourist
6 0 1

Hi

Im trying to add a metafield to my product pages, but when I add the text block and search for the dynamic metafield I already created (Product information) I cannot find it, I already tried several times to create the metafield but nothing works, I don't know if the theme SPOTLIGHT doesn’t support metafields , do I have to modify the code ? 

 

Please help 😞

 

 

Replies 9 (9)

Ahmad31
Shopify Partner
224 21 37

Hi @jsllp, Here are a few things you can check to resolve this issue:

 

  • Ensure the Metafield is Set Up Correctly

    • Go to Settings > Custom data > Products and confirm that the metafield exists.
    • Check if it has the correct namespace and key (e.g., custom.product_information).
    • Make sure the content type (Text, Integer, etc.) matches the expected format.
  • Check if the Metafield Has a Value

    • If the metafield is empty for a product, Shopify may not display it as an option. Try adding a value to a product and then recheck the theme editor.
  • Verify If the Theme Supports Dynamic Sources

    • Some blocks (like text blocks) may not support dynamic sources. Try adding it inside a rich text block instead.
  • Manual Code Addition (If Needed)

    • If the metafield still doesn't appear, you may need to modify the theme code. Try adding this snippet inside product.liquid or the relevant section file:

 

{{ product.metafields.custom.product_information }}

 

  • This should display the metafield on the product page.

 

Love my work? Buy Me A Coffee
Hire Me: Email me Or Chat on Whatsapp
If you found my solution helpful, please like and accept it. Your support is greatly appreciated!
jsllp
Tourist
6 0 1

Hi thank you

 

I checked everything, so I think it's a prolem of the theme, but i don't have the product.liquid so I don't know where to try the code, I have theme.liquid 

 

Thanks 🙂

jsllp
Tourist
6 0 1

And have product.json also, sorry i'm not an expert

jsllp
Tourist
6 0 1

Thank you I tried but still nothing works 😞

jsllp
Tourist
6 0 1

Hi I find a video that had the solution to the problem https://www.youtube.com/watch?v=z_HL82_6Ank&ab_channel=EdCodes-ShopifyDIYTutorials

I had to add the code to a liquid block and add a little more to have the text organized, thank you for your help

_Lena_
Shopify Partner
1 0 0

Yes! I used exactly the same video for this problem. No amount of Shopify docs would've helped.

webwondersco
Shopify Partner
1204 172 174

Just to confirm, which type you have selected to content add when you created metefield? Connect that metafield in Richtext

 

Or else just share the screenshot of the metafile definition and the screenshot of field type where you would like to fetch it.

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
jsllp
Tourist
6 0 1

Captura de Pantalla 2025-02-19 a la(s) 21.03.15.png

Captura de Pantalla 2025-02-19 a la(s) 21.02.52.png

  

webwondersco
Shopify Partner
1204 172 174

@jsllp so it looks like for the type text the theme used inline_richtext type. try to update it with only type: "richtext".

 

It'll be in main-product.liquid section file I think

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram