Hey There
Im trying to create line breaks for my product title.
This is what it looks like now. Ideally I would like it to read like this:
doodles tee
vintage black
$46
thank you.
Hey There
Im trying to create line breaks for my product title.
This is what it looks like now. Ideally I would like it to read like this:
doodles tee
vintage black
$46
thank you.
you can break your title with this code. ( if they all connect via ’ - ’
{% assign product_title_arr = product.title | split: " - " %}
{% for product_title_item in product_title_arr %}
{{ product_title_item }}
{% endfor %}
Perfect I will try this. Can you tell me where exactly to insert this code?
Thank you
1: Online store > themes > Actions > Edit code > Sections > product-template.liquid
2: find the class name ‘product-single__title’, if you have not edited code before then its in line 131
demo ( you can edit base on it
{% assign product_title_arr = product.title | split: " - " %}
{% for product_title_item in product_title_arr %}
{% if forloop.index == 1 %}
#
{{ product_title_item }}
{% else %}
{{ product_title_item }}
{% endif %}
{% endfor %}
Hey! This worked for my product pages, which is fantastic.
But, its still displaying with " - " on collections pages.
any fix for that?