Re: Use different product titles for the same product on different collection pages

Use different product titles for the same product on different collection pages

Remcodeboer1
Visitor
1 0 0

Hi there, 

For SEO purposes, I'd like to change product titles depending on what collection it's being shown on.

For example, we sell chargers, for the keyword "iPhone charger", on the collection iPhone chargers, I'd like the product title to include the word iPhone. However, for the keyword "Samsung charger", on the collection Samsung chargers, I'd like the product title to include the word Samsung.

Same for cables etc.

One of our competitors has achieved great organic rankings doing this for brands and different models (it's in Dutch):

https://www.gsmoplader.nl/opladers/apple/iphone-12/
https://www.gsmoplader.nl/opladers/apple/iphone-13/


 

Reply 1 (1)

Small_Task_Help
Shopify Partner
749 24 66

Hi,

 

Need to add conditional logic At collection.liquid

Code example

 

 

{% assign collection_handle = collection.handle %}

{% if collection_handle == 'iphone-chargers' %}
  {% assign new_title = product.title | prepend: 'iPhone ' %}
{% elsif collection_handle == 'samsung-chargers' %}
  {% assign new_title = product.title | prepend: 'Samsung ' %}
{% else %}
  {% assign new_title = product.title %}
{% endif %}

<h2>{{ new_title }}</h2>

 

 

 

Please share your store url

To Get Shopify Experts Help, E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad