Shorten the text of the blog on the home page Dawn theme

Hi there,

I want to shorten the text of the blog on the home page.
I’d like to display about 100 characters, and then “…” after that.

What code do I need to change to make this possible?

Best Regards,

Hi @ss11

Thanks for your question!

On the theme files - Go to Snippets

Search for article-card.liquid

From line 53 - You see this block of code
Change the 30 to 100

{%- if article.excerpt.size > 0 or article.content.size > 0 -%}

{%- if article.excerpt.size > 0 -%}
{{ article.excerpt | strip_html | truncatewords: 30 }}
{%- else -%}
{{ article.content | strip_html | truncatewords: 30 }}
{%- endif -%}

{%- endif -%}

If this solves the problem - accept it as a solution.

2 Likes