Hi, Im using Narrative
Is there any way to change the all product page title to actually"All Products" ? Thank you
Solved! Go to the solution
Hello HolyHeck,
Please share your site url.
So that i can check and let you know the exact solution here.
👋Hi @HolyHeck
Go to your https://yourshop.myshopify.com/admin/themes > Actions > Edit code > open your theme.liquid, there you have to find your <title> tag which defines the tag that will be rendered in each page.
You will have something similar to:
<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>
And an approach to change the title for your all products page will be by replacing that code with:
{% if collection.url == "/collections/all" %} <title> All products </title> {% else %} <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> {% endif %}
Let me know if that does the trick in your end.
Thanks you @JavierSanz for your help. But it seem that It only change the tilte of the website not the collection title.
Is there any other way to do this ? I have been thinking about a solution : Write some code like "if there is a collection image then no collection title or else..." and create a collection call " All Products". But I dont have enough knowledge to do that. Is that a possible way ? Thanks you.
P/s: my website is https://warmderlend.com/ . The password is bukrao
-add this code at the bottom of your theme.scss.liquid file
header h1.section-header__title.h2{ font-size:28px !important; }
-please like and mark my answer as accepted solution
This is an accepted solution.
Ok I see,
So it's not the <title> element in your page, but the <h2> element, which host your "Products" text.
For that, again go back to your https://yourshop.myshopify.com/admin/themes > Actions > Edit code > open your theme.liquid, there you have to find this line of code:
<h1 class="section-header__title h2">All {{ collection.title }}</h1>
And replace it with these lines:
{% if collection.url == "/collections/all" %} <h1 class="section-header__title h2">All {{ collection.title }}</h1> {% else %} <h1 class="section-header__title h2">{{ collection.title }}</h1> {% endif %}
Hi, I have to change the page title too, but I don't know what i have to change because i already have a part of code that I don't know if I can edit.
The differece is that I have to change the title page of this page https://www.power-gear.it/collections, not of a specific page of collection
<head>
<script src="https://www.googleoptimize.com/optimize.js?id=GTM-KJ7KVL7"></script>
<!-- Basic page needs ================================================== -->
<meta charset="utf-8">
<!-- Title and description ================================================== -->
<!-- {{ page_title }} -->
<title>
{{ page_title | split: '|' | first }}
{% if current_tags %}
– tagged "{{ current_tags | join: ', ' }}"
{% endif %}
{% if current_page != 1 %}
– Page {{ current_page }}
{% endif %}
{% unless page_title contains shop.name %}
– {{ shop.name }}
{% endunless %}
</title>
User | Count |
---|---|
566 | |
215 | |
129 | |
83 | |
45 |