【发布时间】:2020-03-24 07:52:14
【问题描述】:
我注意到有几家商店在附加商店名称之前,Shopify 似乎会自动截断 <title></title> 中超过 65 或 70 的产品标题。
例如,这个product page。
页面标题变为:
<title>Boho Beach Lace Cap Sleeves Ivory Chiffon Wedding Flower Girl Dress wi - Flower Girl Dresses</title>
虽然应该是:
<title>Boho Beach Lace Cap Sleeves Ivory Chiffon Wedding Flower Girl Dress with Pink Lining - Flower Girl Dresses</title>
我知道 Google 不关心超过一定字符数的标题,例如65 或 70,但仍然保留整个关键字并没有什么坏处。
例如,在这种情况下,如果人们搜索“pink”,在标题中添加“pink”关键字仍然很有帮助。我认为保留标题而不截断它肯定会更好。
那么如何防止 Shopify 截断标题?
我只能在 theme.liquid 中看到这个:
<title>
{{ page_title }}{% if current_tags %}{% assign meta_tags = current_tags | join: ', ' %} - {{ 'general.meta.tags' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} - {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} - {{ shop.name }}{% endunless %}
</title>
不知道我应该在哪里修改才能实现这一点?
【问题讨论】: