Displaying Collection Information on Products


In this advanced guide, we'll show you an example of how to add Collection Information to your product pages. This can be useful if you wanted to provide your customers with a little extra information on the collection that a product came from.

Getting Started

Open Custom Fields and get started by creating a new Liquid Template Field. This will contain the code that we have to write in order to get our Collection information to print. In this example, we named our new Liquid Template Field, Collection Information.


After you click Create New Liquid Template Field, you will be brought to the Edit Custom Fields screen where you can edit the code of your fields, and exclude items from display as well. 

In here we want to customize the code so that it prints what collection the field is in only when accessed from a collection.


The code above first checks to see if the product is part of a collection. It then prints "This product is in the ___ collection." The {{ collection.title }} object grabs the current active collection and spits it out in plain text. The strong tag surrounding this puts our text in bold.

The end text should look something like: "This product is from the Furniture collection."