Help understanding the homepage "heroBanner" #1790
-
I see the heroBanner on the homepage, which is actually getting retrieved from a placeholder if the GraphQL request is null but i'm not sure I understand where to set these metafield values in shopify
I can't find any good documentation on this. Would someone be able to point me in the right direction? Metafields in shopify are rather elusive. Appreciate the help! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
I haven't tried it, but from the wording I'd expect you need to add the metafields at the below URL. https://SUBDOMAIN.myshopify.com/admin/metafields/collection/create |
Beta Was this translation helpful? Give feedback.
-
You can create metafields in Admin > Settings > Metafields. In this case, you'd add a new definition to From there they appear under each collection: |
Beta Was this translation helpful? Give feedback.
-
👋 @bigdogvision-jeff, we definitely need to improve metafields documentation in hydrogen. You are correct, that we use a placeholder if the metafields are null. We currently set the custom metafields in the shopify store, which then we fetch through the storefront API. Here you can find extra documentation complementing @scottdixon's answer: Let me know if this helps, or join our discord channel and we can chat about this: https://discord.com/invite/shopifydevs |
Beta Was this translation helpful? Give feedback.
-
Awesome! Thanks @lordofthecactus and @bethkellyshopify Appreciate the help!! |
Beta Was this translation helpful? Give feedback.
-
A note for anybody finding this thread and still struggling. In the Shopify Admin Metafields interface you check
This includes Hydrogen, however, many of the popular metafield management apps, such as "Metafields Guru" (which I highly recommend) also have the same checkbox, but currently do not seem to expose them to the Hydrogen sales channel. So make sure you have all of your metafield definitions defined in the official Shopify admin page. |
Beta Was this translation helpful? Give feedback.
-
how is it possible to add metafields to the homepage itself ? in the Shopify panel settings i see options for adding and exposing metafields to almost any page (products, blogs, blog posts, variants, ...etc) but not the homepage ? |
Beta Was this translation helpful? Give feedback.
👋 @bigdogvision-jeff, we definitely need to improve metafields documentation in hydrogen.
You are correct, that we use a placeholder if the metafields are null. We currently set the custom metafields in the shopify store, which then we fetch through the storefront API. Here you can find extra documentation complementing @scottdixon's answer:
https://help.shopify.com/en/manual/metafields/metafield-definitions/creating-custom-metafield-definitions
Let me know if this helps, or join our discord channel and we can chat about this: https://discord.com/invite/shopifydevs