Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Solved! Go to the solution
This is an accepted solution.
1. First. use single line text instead
2.Reset the value on your product page. then your issue will be fixed.
@Ellenarosemary can you please share this page link? May be your metafield is using richtext
As @Sonya_2025 suggested, just do not edit theme code but use "Custom liquid" block for this.
Or, maybe use a rich text type metafields if it's compatible with the theme setting you're using (or use another block, compatible with rich text?)
Hi, if you just bind your metafield in the theme editor settings. then it will not show properly.
You need add the code to your product liquid. eg. my metafield name is listsingleline.
{%- for linevalue in product.metafields.custom.listsingleline.value -%}
{{ linevalue }} <br>
{%- endfor -%}
Hope this helps.
Thanks it sort of worked, the spacing is better and it matches my other metafields, but its still not showing as individual lines
Can you share some screenshot that how the metafield defined and how you set the value
This is how it is shown on the Products Page
This is how it is entered in the product itself, return after each line
Hope this is what you wanted
This is an accepted solution.
1. First. use single line text instead
2.Reset the value on your product page. then your issue will be fixed.