Custom Product Titles For Different Locations

constar
Excursionist
39 0 4

How can I set up custom product titles so there are different titles on product pages/collection pages?

i.e.
- Title v1: Product Page
- Title v2: Collection Page 1
- Title v3: Collection Page 2

I would appreciate any insight into solving this.

Replies 3 (3)

PaulNewton
Shopify Partner
6274 573 1319

Always backup your theme before making changes

This varies wildly by theme in which files and how you will customize things.

Some themes have such things as a theme setting so be sure to check there first.

To customize your html titles , or resource titles(collections,products) use the liquid template object https://shopify.dev/api/liquid/objects/template 

And {% if %} tag or case/when https://shopify.dev/api/liquid/tags/control-flow-tags#case-when 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


constar
Excursionist
39 0 4

@PaulNewton Firstly, thank you for your input.

There is no option in the theme itself, so I'll have to input code manually. I'm not a developer unfortunately (just a business owner) so my knowledge is limited. How would I go about constructing the code from those links? It's a little confusing for a beginner so I'd really appreciate some expertise on this.

Theme is Turbo. Thank you!

PaulNewton
Shopify Partner
6274 573 1319

@constar wrote:

There is no option in the theme itself, so I'll have to input code manually. I'm not a developer unfortunately (just a business owner) so my knowledge is limited.


Ah i see this is the technical forum, if you need paid support for this customization contact me at paull.newton+shopifyforums@gmail.com 

 

Your gonna have to do the research and dig through the turbo theme for it's product template,sections and snippets for wherever whichever titles your trying to affect(html <title>'s or <h1> title tags etc.)

As for constructing the code search the forums and google for "shopify how to show on collection pages only"  or other similar word phrases for tutorials or solved posts that deal with the template object using some code similar to below:

{% assign product_title = "" %}
{% if template == "product" %}
 {% assign product_title = product.title %} {% comment %}- Title v1: Product Page{% endcomment %}
{% elseif template== "collection" %}
 {% assign product_title = product.title %}   {% comment %}- the default collection template{% endcomment %}
{% endif %}

{% if template.suffix == "collection-page-1-handle" %}
  {% assign product_title = product.title %}   {% comment %}- Title v2: Collection Page 1 alternative template{% endcomment %}
{% elseif template.suffix == "collection-page-2-handle" %}
  {% assign product_title = product.title %}  {% comment %}- Title v3: Collection Page 2 alternative template{% endcomment %}
{% endif %}

 Note: Use case/when if logic is longer, and unless the titles are consistently following a convention you'll probably want to make the alternative titles use metafield definitions

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org