Metafield Images on Blog Post Theme Not Working

printpeppermint
Visitor
3 0 0

For all other page templates it allows me to populate image fields with data from metafields but not when I create a blog post theme. Is this a limitation of shopify or am I doing something wrong? It only shows the "brand" related images like "cover image" etc. 

Please help 🙂 

Thanks!

Replies 2 (2)

nicotroplent
Shopify Partner
21 0 0

Hello, it is not working for me either. As you mentioned, I could only get brand related assets. However, I was able to include it using a custom liquid section. Here is the code I used: 

 

<img style="width:100%;" src={{ article.metafields.custom.image | img_url }}/>

 

The name of my blog post metafield is: image. You need to adjust the fields with your namespace and key metafield combination.


Also, the styling may or may not be appropriate depending on your image. Feel free to edit the CSS or contact me if you need more customization.

 

View from Theme EditorView from Theme Editor

 

Best,
Nico

Did I solve your issue? Like & Accept Solution to help the community
Want to customize your store, contact me nicotroplent@gmail.com
Nico - Shopify Partner
HighburyDave
Visitor
3 0 0

Hi is this the only solution to this problem or has this been fixed? 

I am trying to add a list of images to my blog post but the metafield I create does not come up on any sections that should be related...

 

If this is the only solution, where can I add this code?

 

Thanks!