How can I code a section to appear on a specific collection page only?

Hi I have a question regarding Collection template. So if i’m going to add a section to my collection template, that section is showing on all my collection pages.

Is there a way to code that section that it will only show for this specific collection page not on all collection pages?

1 Like

Hi @Likha

You have to create a template, then you can create a different section to assign to that template. You need to publish the theme first before you can see the template options

I see. So only creating a new template is the solution? No way like adding a logic in the liquid like if collection name =collectionName → display section?

Hi @Likha

Yes, definitely, if you just want to edit part of the section then you use the logic below

{% if collection.title == "collection title" %}
Your custom section...
{% else %}
Default section...
{% endif %}