Remove store name from my homepage SEO title

Highlighted
New Member
6 0 0

Hello,

First of all thank you for reading this and thanks in advance

I have noticed two things when searching my website on google:

1.- The homepage shows the name of my store FIRST and then what i have inputted as my homepage title. So google shows something like this: "Mystore name: my title" , when in fact i only want to be seen "my title", that is what i have inputted as my homepage title in shopify settings.

2.- With the rest of the pages (products, bogs etc) SEO titles, it adds my store name at the END like this: "title - Mystore name". As this is at then end i don't mind to keep it.

How can i remove this two problems? Specially point 1?

I have debut theme and my code in theme.liquid is as follow:


{%- capture seo_title -%}
{%- if request.page_type == 'search' and search.performed == true -%}
{{ 'general.search.heading' | t: count: search.results_count }}: {{ 'general.search.results_with_count' | t: terms: search.terms, count: search.results_count }}
{%- else -%}
{{ page_title }}
{%- endif -%}
{%- 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 -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
– {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
<title>{{ seo_title | strip }}</title>

--

I believe i just have to remove this part to resolve the two issues mentioned above:


{%- unless escaped_page_title contains shop.name -%}
&ndash; {{ shop.name }}
{%- endunless -%}

Am i correct?

Thanks a lot!

0 Likes