Why is my created metafield not showing on home and PDP pages?

Why is my created metafield not showing on home and PDP pages?

MaBa
Explorer
116 1 19

Hi,

 

I have 2 questions about metafields:

 

- I created a metafield I wanted to display in the Home page but it never shows up in the list of available metafields (only the Brand ones are available). Am I doing something wrong?

- I created a multi-line metafiled that I wanted to display in the PDP. Also in this case this specific metafield don't show up in list of available metafields (for the record, I managed to add a single line metafield). Am I doing something wrong?

 

Thanks a lot

Replies 9 (9)

ExpertRookie
Shopify Partner
1518 249 325

Hi @MaBa ,

 

I guess your theme does not support the type of metafields you have created. In this case, you should hire an expert to solve your issue

- Was my reply helpful? Please Like and Accept Solution to let me know!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me on expert.rookie.team@gmail.com regarding any help.
MaBa
Explorer
116 1 19

I'm using theme Dawn and I have already used the same metafields in other pages but I cannot use them in Home and PDP

ExpertRookie
Shopify Partner
1518 249 325

hi @MaBa 

What type of metafied you created?

- Was my reply helpful? Please Like and Accept Solution to let me know!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me on expert.rookie.team@gmail.com regarding any help.
MaBa
Explorer
116 1 19

I created 2 product metafields:

  • single-line text. I managed to display it in the PDP
  • multi-line text. I didn't manage to display it in the PDP

I created 2 page metafields (single-line and multi-line text) and I didn't manage to display none of them in the Home page

 

ExpertRookie
Shopify Partner
1518 249 325

@MaBa 

I created  a single-line-type metafied and use Block text to show it. The metafield works fine on Dawn

Screenshot (2).png

- Was my reply helpful? Please Like and Accept Solution to let me know!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me on expert.rookie.team@gmail.com regarding any help.
skanpaul
Tourist
8 0 0

what about the home page?

 

Elizabeth_craig
Shopify Partner
14 2 10

I don't think there is a direct way to add metafields to the homepage ie. with blocks or sections. You can, however, add a custom liquid section. Here you could reference your metafield data. To access the metafield data, you'd input: 

 

{{ shop.metaobjects['type']['handle'] }}
 or 
{{ shop.metaobjects.type.handle }}

 

into a custom liquid section, to access a metaobject. Replace type and handle with the metaobject's type and handle.

 

To access a product metafield, you'd input:

{{ product.metafields.namespace.key }}

Replace namespace and key with the metafield's namespace and key.

skanpaul
Tourist
8 0 0

I need the same

R-Daneel
Shopify Partner
18 0 20

The "page" metafield object only refers to pages you create outside of the theme code using the Pages admin in Shopify. It would be helpful if Shopify could add a global section to settings/custom data so that we can define metafields that are available to the store, except checkout (of course), but don't need to be defined per object (e.g., product, page, etc.).