How can I add a subtitle translation to collection titles in Stiletto theme?

Bonjour!

I would like to add a line under our Collection titles to add the translation in Japanese in a smaller font size that the French version above. We’re using Stiletto theme.

I have created the metafield my_fields.sub_title in Collections but I would need some coding to make it work!

Thanks so much for your assistance!

Hello @Olivier619 ,

You can try to follow these steps:

  • Go to Online Store → themes → actions → edit code
  • Go to Sections folder → collection-template.liquid
  • Find the code that outputs the Collection title, it will look like this
# {{ collection.title }}
  • Below this line, add the following code to output the sub-title:
{% if collection.metafields.my_fields.sub_title %}
  

{{ collection.metafields.my_fields.sub_title }}

{% endif %}
  • Save and preview

Hope this can help. Let us know if you need any further support.

Ali Reviews team.

Hi,
Please share your store URL and if your store is password protected then also provide password too.
Thank you.

Hello @irene-vintage

Thanks a lot for your prompt feedback!

Actually there is no collection-template.liquid in my Sections folder…

I have found a collection-item.liquid in my Snippets folder.

And for the code, I can only find the following:

I tried pasting the code under this but it doesn’t work…

Your assistance is still much appreciated!

Kindest regards,

Dear Denishamakwana,
Many thanks for your prompt reply. Here is our webstore URL:
www.christophe-roussel.jp
Your assistance is greatly appreciated!
Kindest regards,
Olivier

Hello @Olivier619

You can try this code: it will be helpful to you

Go to the Online Store->Theme->Edit code->Assets->theme.css>Add this code at the bottom.

html.do-anim .animation.is-visible .animation--section-introduction>* {
    text-decoration: underline !important;
}