fbpx
Skip to content

How to fix broken excerpts in Shopify blog previews

If you are using Shopify, and if you are using the blog previews, you may encounter an issue where the preview only shows up in some languages.

If so, you’ll find below how to fix it.

Why it breaks

The { { excerpt } } code in your Shopify theme automatically pulls out an excerpt from your article. Typically, this is the first 400 characters or so.

Because it’s pulling the beginning of the article, it may happen that the language markers end up being missing from the excerpt.

e.g. if your text is something like:

….

English text etc

..

French text

….

The { { excerpt } } code may only pull out:

….

English text

If it skips the rest, then there’s nothing for the Multilingualizer to work with.

Write your own excerpt to fix this

If you wish to fix this, you should write your own excerpt. Then, Shopify will not guess at the excerpt, it’ll use what you’ve written.

In the excerpt, be sure to include the beginning and ending language markers for on-page translation.

That’s it – do this, and your excerpts will preview properly from your home page.

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.