Want to add line breaks to product title on Pipeline Theme

blissiblebox
New Member
1 0 0

I am looking to add a line break to my product titles, for example I want the brand of my product on the top line, followed by the product name, for example:

 

Big Heart Tea Co.

Earl Grey

 

But I am unsure which code to use and where, anyone have any ideas? Thanks!

0 Likes
Guleria
Shopify Partner
1254 263 344

Hello,

Search for {{ product.title }} in product.liquid under Templates or under sections or maybe be it's under snippets depends on the structure of the theme you are using.

Once you find it replace it with 

{% assign title_array = product.title | split: ". " %}

{{ title_array .first }} <!--- this is first line of title -->

{{ title_array .last}} <!-- this is second line of html -->

Arrange code as you want in html and it will done.


Note: In above code I use (.) dot as a identifier to split the title, in any product if you don't have (.) dot it will not work.

Thanks

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate Click here (Its my paypal)
0 Likes