Solved

How can I remove my shop name from the homepage title only?

redwoodfurn
Tourist
7 1 0

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>

Accepted Solutions (2)
GemPages
Shopify Partner
5588 1261 1209

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

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center

View solution in original post

redwoodfurn
Tourist
7 1 0

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>

View solution in original post

Replies 9 (9)

GemPages
Shopify Partner
5588 1261 1209

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

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
redwoodfurn
Tourist
7 1 0
GemPages
Shopify Partner
5588 1261 1209

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

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
redwoodfurn
Tourist
7 1 0

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>

miraluck
New Member
4 0 0

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 ! 

miraluck
New Member
4 0 0

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 !~!!

miraluck
New Member
4 0 0

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>

 

 

Kani
Shopify Partner
468 125 224

Hi @redwoodfurn 

 

try to replace 

{{- page_title -}}

with this code

{%- if template.name == 'index' -%}
    {{ page_title | replace: shop.name, '' }}
{%- else -%}
    {{ page_title }}
{%- endif -%}

 

Hey!! ʕ ᵔᴥᵔ ʔ
Please click 'Like' and ' Accept as Solution' to encourage me to continue sharing my expertise. ♡
If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response. 🙂
redwoodfurn
Tourist
7 1 0

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