homepage title contains store name

Highlighted
Tourist
13 0 1

when searching on google my homepage title contains my store name first then shows what i have inputted as my homepage title.

i want to remove my store name from appearing

here is the theme.liquid code

 <!-- Title and description ================================================== -->
  <title>
  {{ page_title }}{% if current_tags %}{% assign current_tags_joined = current_tags | join: ', ' %} &ndash; {{ 'general.meta.tags' | t: tags: current_tags_joined }}{% endif %}{% if current_page != 1 %} &ndash; {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless %}
  </title>

  {% if page_description %}
    <meta name="description" content="{{ page_description | escape }}">
  {% endif %

do i just delete this part

{% endif %}{% unless page_title contains shop.name %}

do i havetp replace it with something?

nervous about changing the code!!

 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
469 58 132

Hey, spflynn!

Lizzy here, I'm one of the Gurus from the support team at Shopify.

If you'd like to remove your store name from your store's title you're almost right about the code you would need to delete. You'll want to remove this chunk:

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

I know you mentioned that you're nervous about editing your code. I always like to suggest duplicating your theme before making any changes. You can do this by going to Online Store>Actions>Duplicate. That way you've got a backup if anything doesn't go as expected!

Any changes you make on your site, can take a bit of time to be reflected in Google search results. To speed up the process you can request that they crawl your site again.

Does this help with the edits you're wanting to make? If you have any other questions about it let me know. 

Thank you, :)

Lizzy

Lizzy | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
New Member
2 0 1

Hi Lizzy, thanks for you response.

 

I have a similar problem, when I search my store on google the title of the home page contains duplicated store name as you can see at the photo attached

 

Screenshot 2019-10-29 10.18.18.png

 

I removed the code you suggested and waited more than 12 hours but duplicated title keeps on results page.

 

Can you help?

 

Thanks.

 

0 Likes
Highlighted
New Member
7 0 0

Hello

I have the same problem. My homepage seo title shows my store name at the beginning and my other pages shows my store name at the end. Although i have not my store name in any of the pages.

My code in theme.liquid of debut theme is the following:

{%- 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: ', ' -%} &ndash; {{ 'general.meta.tags' | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
&ndash; {{ 'general.meta.page' | t: page: current_page }}
{%- endif -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
&ndash; {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
<title>{{ seo_title | strip }}</title>

I have tried delating the following:

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

But it didn't work. What can i do?

Thanks

0 Likes