Shopify themes, liquid, logos, and UX
How can I change my product page title from Sterilization tablets to 'Hygia Dental cleaning tablets - 30 Tablets'?
I would like this to be done only on the product page and not in the actual product linked to collections page.
Thank you in advance guys!
url: hygiadental.com
pw: melek
Solved! Go to the solution
This is an accepted solution.
@jeffreym, I'm really sorry, I missed some code. Here is the correct version 😥
<div class="product__title" {{ block.shopify_attributes }}>
{% if product.id == 7748266754148 %}
<h1>Hygia Dental cleaning tablets - 30 Tablets</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">Hygia Dental cleaning tablets - 30 Tablets</h2>
</a>
{% else %}
<h1>{{ product.title | escape }}</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">{{ product.title | escape }}</h2>
</a>
{% endif %}
</div>
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Hi @jeffreym ,
It requires some code to achieve your requirement. You can follow these instructions.
Step 1: Go to Online Store -> Theme -> Edit code.
Step 2: Find the file main-product.liquid, and locate the code snippets I've marked here.
Step 3: Replace it by this code:
{% if product.id == 7748266754148 %}
<h1>Hygia Dental cleaning tablets - 30 Tablets</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">Hygia Dental cleaning tablets - 30 Tablets</h2>
</a>
{% else %}
<h1>{{ product.title | escape }}</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">{{ product.title | escape }}</h2>
</a>
{% endif %}
Like this
I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.
Have a nice day!
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Hi, I put this into my code and I now have extra titles on the other 2 product pages.
This is an accepted solution.
@jeffreym, I'm really sorry, I missed some code. Here is the correct version 😥
<div class="product__title" {{ block.shopify_attributes }}>
{% if product.id == 7748266754148 %}
<h1>Hygia Dental cleaning tablets - 30 Tablets</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">Hygia Dental cleaning tablets - 30 Tablets</h2>
</a>
{% else %}
<h1>{{ product.title | escape }}</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">{{ product.title | escape }}</h2>
</a>
{% endif %}
</div>
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
beautiful thankyou sir!
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025