Richtext metafiled value code not working

Topic summary

A user encountered an issue displaying rich text metafield values on a Shopify product page in the Debut theme. While a \

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

I am adding the “rich text” meta field in the product but it is not working when I get it on the product page using this code in the debut theme:

For Heading:

{{ product.metafields.custom.faq_heading }} “it is working well”

For Description Richtext: (does not work)
{% assign faq_data = product.metafields.custom.faq_data %}
{{ faq_data | raw }}

Can Someone give me the solution, what I do?

Screenshot:

Hey @saeedkhan_9774 ,

I think I’ll need more information to understand it – what would you like to achieve with the second piece of code? Why are using the following syntax?

{{ faq_data | raw }}

Thanks!

I want to add an accordion on the single product page using metafields. I used “text” metafields for Accordion Title and the “rich text” field for the Accordion description. The code below is for Accordion description.
{% assign faq_data = product.metafields.custom.faq_data %}
{{ faq_data | raw }}

Hey @saeedkhan_9774 ,

I see. The filter

raw

doesn’t exist in Liquid. So, not sure what you expect that it would do?

Try rendering just the

{{ product.metafields.custom.faq_data }}

and see if it renders correctly.

still not working after removing “raw”. below are the meta fields I render to a single product page.

“Single Line Text” is working well but “rich text” is not.

Ok, I think I have a solution.

You don’t need to use the “assign”, just try this:

{{ product.metafields.custom.faq_data | metafield_tag }}

Let me know if it works.

1 Like

it worked. amazing! thanks a lot!

You’re welcome! :slightly_smiling_face: