How to Use the Multi-Line Text Metafield to Display HTML in Shopify

preview_player
Показать описание
Did you know that you can use Shopify's multi-line text metafield to display HTML as a dynamic source directly in the customizer?

It's been a bit of a bug, or at least unexpected behavior, up until this point where only single line text metafields could support HTML, at least right out of the box or by selecting it as a dynamic source in the customizer.

This quick Shopify Dev Tip walks through the quick and easy process of creating multi-line text metafields and then linking them directly in the customizer as a dynamic source to properly display HTML, rather than plain text values.

---
0:00 : Introduction
0:42 : Add product metafields in Shopify settings
1:45 : Update product metafields
3:05 : Linking metafield as dynamic source
4:25 : Using correct field for dynamic source
---

Resources
Рекомендации по теме
Комментарии
Автор

This is an excellent workaround for adding HTML content via dynamic data sources - thank you so much!

lanta-darren
Автор

You earned a sub and like, man I've been stuck on this for hours, I couldn't find any solution to this. THANK YOU!! Life saver bro!

ecomkevv
Автор

Thanks, Taylor.
That was very useful.

ShadyAnis
Автор

You are a rockstar! Thank you so much!

iamspens
Автор

Awesome worked perfectly thank so much bro!

Ravsin
Автор

Hi mate, it worked perfect. Rendered svg code for different product page icons.👍

Автор

Great tutorial works a treat. Good workaround for plain text values

Ed-wcfp
Автор

You are a genius! Thank you sir, earned a sub :)

mikestaebell
Автор

Hi Taylor. Thx for this video. I am new to Shopify and have purchased the Focal Theme. I have tried many things including your info but nothing seems to work for what I am trying to accomplish. Trying to add a 2 column by 11 row table to my measurement chart for a product. Does not seem to want to work. Can you shed any advice on this please. Tried added the json to the metafield. Did not work. I am really stumped and cannot move forward. Would greatly appreciate your advice. Thx much!

rushka
Автор

Hey it's not working in my case. I'm trying to render a table from multiline text metafield and it's showing table html as a text on the web page.☹️

madhurikadam
Автор

Can we use this to have tables? Like size chart for clothing

DriftingSquirrel
Автор

Hi, thanks. How can we change the text color in a metafield?

EnesUnver-wmjz
Автор

Have any idea how to have display variants metafields and have them dynamically change on choosing another variant?

marcelfullerton
Автор

Can we show html in meta description, different for each product with the help of these setting?

Muhammadumair-tuun
Автор

Does not seem to work anymore "Setting 'text' can't include Liquid syntax ('{{', '}}', '{%' or '%}') without valid dynamic sources."

akunpurku
welcome to shbcf.ru