Call metafield from within product description

booknerd
Tourist
24 0 2

Impulse theme (which is still in draft, not live)

 

Here's a link to the draft preview: https://tqr8w9aky5o99cd7-79883862294.shopifypreview.com

 

I have product metafields and I'm trying to insert them into the product description. However, it's just showing up as text instead of actually calling up the metafield.

 

The soundcloud sample is called up using the same metafield, but it's in an HTML block that I inserted via the theme builder. I've also successfully used the same code in liquid blocks.

 

Is it possible to use a metafield within the product description? If so, how do I make it execute the call command instead of treating it like text?

 

Thanks!

Screenshot 2024-05-02 095353.png

Replies 2 (2)

PageFly-Oliver
Astronaut
878 190 171

Hi @booknerd 

 

you can try

PageFlyOliver_0-1714694982786.png

 

 

 

Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

booknerd
Tourist
24 0 2

Thanks for the response! I haven't tried your code yet, but it looks like it's meant to insert a custom metafield only if the product description is blank, but that's not quite what I'm trying to do. Ideally, I just want to insert a metafield into the description.

 

For example:

 

Product description Product description Product description Product description Product description Product description Product description Product description Product description [CUSTOM METAFIELD] Product description Product description Product description Product description Product description Product description Product description Product description.

 

Is that possible?