有什么方法可以在Shopify网站的首页上添加Metafields数据?
我想在我的Shopify网站的主页上显示一些内容,内容添加在为页面创建的元地板中。有什么方法可以在Shopify网站的首页上添加Metafields数据?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以访问类似页面资源的元场:
如果您在另一个页面上(例如主页),则需要首先请求页面对象才能访问其Metafield:
注意:确保替换
Page Handle
带有页面的句柄。You can access metafields of a page resource like this:
If you are on another page (e.g. the homepage) you need to request the page object first in order to access its metafields:
Note: Make sure to replace
page-handle
with the handle of your page.