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!
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024