Trying to get line break in product description

Trying to get line break in product description

themaxwolf
Excursionist
19 0 8

omniahebeidart.com PW 1234

 

i am trying to get the line split between "size" and "medium" to specifically show up on the WORKS ON CANVAS and WORKS ON PAPER collections pages. i have tried adding <b/r> in the HTML product description - didnt fix my issue. Image attached for reference. 

Replies 9 (9)

BiDeal-Discount
Shopify Partner
801 107 180

Hi @themaxwolf 

You should try to add <br /> tag between "size" and "medium". Not <b/r> as your mention

- Helpful? Like & Accept solution! Coffee tips fuel my dedication.
- BiDeal Bundle Volume Discounts: Upsell with discount bundles, quantity breaks, volume discounts & mix-and-match bundles. AOV+ with free gifts, free shipping & progressive cart
- Contact me via WhatsApp

Jacob0908
Shopify Partner
26 1 2

Hello @themaxwolf Could you share store url? I will let you know the solution after check the url on myend

themaxwolf
Excursionist
19 0 8
Jacob0908
Shopify Partner
26 1 2

@themaxwolf Could you add code like this? Please let me know if it's not working on your-end.

{% assign parts = product.metafields.custom.specs | split: 'Medium:' %}
<div class="card__description">
  {{ parts[0] }}<br>
  Medium: {{ parts[1] }}
</div>
themaxwolf
Excursionist
19 0 8

should I just add this at the bottom?

 

Jacob0908
Shopify Partner
26 1 2

@themaxwolf you can add it instead of the product description.
So you can replace it like this:

{% assign parts = product.description | split: 'Medium' %}
<div class="card__description">
{{ parts[0] }}

{% if parts.size > 1 %}
   Medium: {{ part[1] }}
{%%}
</div>

 please find the card__description class and replace code like above.

Let me know if you need my help. I hope your working is well. Regards

Jacob0908
Shopify Partner
26 1 2

@themaxwolf Could you approve the like and solved problem when it's working?

themaxwolf
Excursionist
19 0 8

Do I put that into the HTML code of the product?

This is what it gave me.

Jacob0908
Shopify Partner
26 1 2

@themaxwolf No, I feel it's product card snippet on the PLP(Product list page). You need to find the product card liquid code on your project. It's PDP(Product detail page). 

please remove code on the product.liquid.
Could you find the this part on your project? I feel it seems like "product-card.liquid" or ".... card.liquid" of the snippet folder.

Or You can find this snippet(it means like component) on collection page.
And then replace it instead of red box. Could you share your code if you find the snippet file?

Jacob0908_0-1749137462211.png