How can I automatically shorten product titles over 56 characters?

Topic summary

Main request: Automatically shorten product titles longer than 56 characters with an ellipsis (…) on featured collection and collection pages only.

Details: The requester shared screenshots showing current long titles vs. the desired truncated display. Scope is limited to listing contexts (not product pages).

Proposed solution: Use a Shopify Liquid snippet that sets max_length = 56, checks product.title length, and applies the truncate filter, then appends “…” if the limit is exceeded. Implement by replacing the product title output in the relevant collection/featured collection templates or product-card component.

Notes: Liquid is Shopify’s templating language; the truncate filter shortens strings to a specified length. Images provided illustrate the before/after behavior; the code snippet is central.

Status/outcome: A working approach was provided; implementation/confirmation is pending. Next steps: insert the snippet where titles render on collection and featured collection sections, verify it doesn’t affect other areas, and test edge cases (very short titles, exact 56 chars, multilingual titles).

Summarized with AI on January 14. AI used: gpt-5.

Good morning,

I would like that when the product title is above 56 characters, the name automatically stops and adds 3 small points. (ONLY for featured collection and collections)

EXAMPLE HOW IT IS NOW:

EXAMPLE HOW I WOULD LIKE IT TO AUTOMATICALLY DO ABOVE 56 CHARACTERS IN THE TITLE:

website: jadis-shop.com

password: rj

Do you know how to do it ?

thank you very much in advance

Try something like this; let us know if you need a hand implementing:

{% assign max_length = 56 %}
{% assign product_title = product.title %}
{% if product_title.size > max_length %}
{% capture truncated_title %}{{ product_title | truncate: max_length, “” }}…{% endcapture %}
{{ truncated_title }}
{% else %}
{{ product_title }}
{% endif %}