I want to show some content on the homepage of my shopify site, the content is added in metafields created for pages. Is there any way to add metafields data on the homepage of shopify site?
You can access metafields of a page resource like this:
{{ page.metafields.namespace.key }}
If you are on another page (e.g. the homepage) you need to request the page object first in order to access its metafields:
{{ pages['page-handle'].metafields.namespace.key }}
Note: Make sure to replace page-handle
with the handle of your page.