Shopify themes, liquid, logos, and UX
Hi,
Hoping someone can help. I'm trying to add collapsable tabs to my product pages and using metafields to pull in the required information. Within the product description tab I'd like to have a bulleted list. I've added a metafield list but when I'm adding the values they're displaying as:
blah, blah and blah
But I would prefer:
Can anyone help? I assume I need to edit the code
Thanks
Hi @Laurasnow
I would like to give you some suggestions below:
- You can try to add the following code where you want to show the metafield.
{%- if product.metafields.custom.metafield_multi_line != blank -%}
<ul>
{% for metafield_value in product.metafields.custom.metafield_multi_line.value %}
<li>{{ metafield_value }}</li>
{% endfor %}
</ul>
{%- endif -%}
- For example, for the Dawn theme, if you want to show the metafield on the product description page, you will add the above code to the main-product.liquid file.
Please let me know if it works for you.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
Product Labels by BSS | B2B Solution & Custom Pricing
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Hello @Laurasnow ,
I would like to give you some recommendations to support you. Let's try using this code and add it to metafield:
<ul>
<li>Blah</li>
<li>Blah</li>
<li>Blah</li>
</ul>
If you require any further information, feel free to contact me.
Best regards,
GemPages Support Team
It doesn't look like metafields support HTML like that. I tried this and it just displays the HTML.
You need to use rich list rather than Multi line as this supports a lot of formating
Thank you! Yes I found out last week that there is a Rich Text content type for metafield.
This is working if typing manually the fields <ul> and <li> directly in the rich text field. But if I copy and paste the code from Excel, the html code automatically disappears, it's not shown in the rich text field and the bulletpoints are not working.
Since I have a lot of products, I have to use the import (Matrixify) and it does not work..
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025