Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
It automatically adds the store name to the end of the home page title information
How can I remove my shop name from the homepage title only?
just only home page.
My theme.liquid configuration
<title>
{{- page_title -}}
{%- if current_tags -%}
{%- include 'advanced-tag-loop' -%}
{% assign title_tags = '' %}
{% assign meta_tags = current_tags | join: ', ' %}
{%- for tag in current_tags -%}
{% assign is_advanced_tag = false %}
{% assign cat = tag | split: '_' | first %}
{%- unless cat == tag -%}
{%- if cat_array contains cat -%}
{% assign is_advanced_tag = true %}
{% assign title_tags = title_tags | append: ', ' | append: tag | replace_first: '_', ': ' %}
{%- endif -%}
{%- endunless -%}
{%- unless is_advanced_tag -%}
{% assign title_tags = title_tags | append: ', ' | append: tag %}
{%- endunless -%}
{%- endfor -%}
{{ 'general.title.tags' | t: tags: title_tags | remove_first: ', ' }}
{%- endif -%}
{%- if current_page != 1 -%}
{{- 'general.title.page' | t: page: current_page -}}
{%- endif -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
</title>
Solved! Go to the solution
This is an accepted solution.
Hi @redwoodfurn
You can try to replace your code to
<title>
{{- page_title -}}
{%- if current_tags -%}
{%- include 'advanced-tag-loop' -%}
{% assign title_tags = '' %}
{% assign meta_tags = current_tags | join: ', ' %}
{%- for tag in current_tags -%}
{% assign is_advanced_tag = false %}
{% assign cat = tag | split: '_' | first %}
{%- unless cat == tag -%}
{%- if cat_array contains cat -%}
{% assign is_advanced_tag = true %}
{% assign title_tags = title_tags | append: ', ' | append: tag | replace_first: '_', ': ' %}
{%- endif -%}
{%- endunless -%}
{%- unless is_advanced_tag -%}
{% assign title_tags = title_tags | append: ', ' | append: tag %}
{%- endunless -%}
{%- endfor -%}
{{ 'general.title.tags' | t: tags: title_tags | remove_first: ', ' }}
{%- endif -%}
{%- if current_page != 1 -%}
{{- 'general.title.page' | t: page: current_page -}}
{%- endif -%}
{%- unless template.name == 'index' -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
{%- endunless -%}
</title>
Kind & Best regards,
GemPages Support Team
This is an accepted solution.
As you said, it was resolved when I added the following bold lines at the bottom of the headers section of the theme.liquid file. This way, it just removed the store name from the home page header info. It continues on other pages. This is exactly what I wanted. Thank you.
{%- unless template.name == 'index' -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
{%- endunless -%}
</title>
Hi @redwoodfurn
Can you give me your page URL (with pass if your store password is enabled), so I can check it and maybe give you a solution?
Kind & Best regards,
GemPages Support Team
This is an accepted solution.
Hi @redwoodfurn
You can try to replace your code to
<title>
{{- page_title -}}
{%- if current_tags -%}
{%- include 'advanced-tag-loop' -%}
{% assign title_tags = '' %}
{% assign meta_tags = current_tags | join: ', ' %}
{%- for tag in current_tags -%}
{% assign is_advanced_tag = false %}
{% assign cat = tag | split: '_' | first %}
{%- unless cat == tag -%}
{%- if cat_array contains cat -%}
{% assign is_advanced_tag = true %}
{% assign title_tags = title_tags | append: ', ' | append: tag | replace_first: '_', ': ' %}
{%- endif -%}
{%- endunless -%}
{%- unless is_advanced_tag -%}
{% assign title_tags = title_tags | append: ', ' | append: tag %}
{%- endunless -%}
{%- endfor -%}
{{ 'general.title.tags' | t: tags: title_tags | remove_first: ', ' }}
{%- endif -%}
{%- if current_page != 1 -%}
{{- 'general.title.page' | t: page: current_page -}}
{%- endif -%}
{%- unless template.name == 'index' -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
{%- endunless -%}
</title>
Kind & Best regards,
GemPages Support Team
This is an accepted solution.
As you said, it was resolved when I added the following bold lines at the bottom of the headers section of the theme.liquid file. This way, it just removed the store name from the home page header info. It continues on other pages. This is exactly what I wanted. Thank you.
{%- unless template.name == 'index' -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
{%- endunless -%}
</title>
Why would you only want to do the front page??? that horrible seo. This whole thing shouldn't be set up like this to begin with !
Doesn't work !!! Makes no sense ~~~~ I need it to stop adding tags to all of my pages. why on earth does shopify set it up like this !! Its ridiculous !~!!
mine looks like this !!!!
<title>
{{- page_title -}}
{%- if current_tags -%}
{% capture cat_array %}{%- render 'advanced-tag-loop' -%}{% endcapture %}
{% assign cat_array = cat_array | split: '|' %}
{% assign title_tags = '' %}
{% assign meta_tags = current_tags | join: ', ' %}
{%- for tag in current_tags -%}
{% assign is_advanced_tag = false %}
{% assign cat = tag | split: '_' | first %}
{%- unless cat == tag -%}
{%- if cat_array contains cat -%}
{% assign is_advanced_tag = true %}
{% assign title_tags = title_tags | append: ', ' | append: tag | replace_first: '_', ': ' %}
{%- endif -%}
{%- endunless -%}
{%- unless is_advanced_tag -%}
{% assign title_tags = title_tags | append: ', ' | append: tag %}
{%- endunless -%}
{%- endfor -%}
{{ 'general.title.tags' | t: tags: title_tags | remove_first: ', ' }}
{%- endif -%}
{%- if current_page != 1 -%}
{{- 'general.title.page' | t: page: current_page -}}
{%- endif -%}
{%- unless page_title contains shop.name -%}
{{- 'general.title.shop' | t: shop: shop.name -}}
{%- endunless -%}
</title>
Hi @redwoodfurn
try to replace
{{- page_title -}}
with this code
{%- if template.name == 'index' -%}
{{ page_title | replace: shop.name, '' }}
{%- else -%}
{{ page_title }}
{%- endif -%}
does this apply only to the home page or to all pages? I just wanted it for the home page. You can see store name at the end of the homepage title. RedWood Furniture Store: Your Gate to Beautifully Furnished Home — Redwood Home Furniture
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024