How to add text/subheading below the title of a Collection List on the Home Page, Brooklyn Theme?

How can you add a subheading or text below the title for a Collection List on a the home page?

For example, on my home page I have a collection list titled “curated collections” with three collections below it. I would like to add a sentence (ie a subheading or text) below it with a brief description of the collection list. Is this possible?

Thank you!

Hey @Zag4242 ,

This can be done using edit liquid file sections/featured-collection.liquid. Goto this file and see the following screenshot and add that line below the heading and replace your text.

Hope this works for you.

Thanks!

1 Like

Hey @dmwwebartisan

This works for adding subtext, however I have two separate collections lists on my home page and this added the same text to both.

Is it possible to add different text below the headlines of each collection list?

Thanks!

To achieve this you will want to do it like so instead

{% if collection.handle == "shirts" %}
Subtext Shirts here

{% elsif collection.handle == "pants" %}
Subtext Pants here

{% else %}
Subtext Other Collections here

{% endif %}

This will show a subtext for “shirts” & “pants” collection, and then a subtext to all of the other collections. If the collection name has spaces the handle replaces them with dashes eg: long sleeve turns into long-sleeve

Hope this helps and let me know if you need me to go into more detail on how to integrate this for your collections.

Hi @Jayden-VAIUS

I can’t get this to work. Just to make sure we are on the same page, I am talking about Collections Lists features on the home page, not collections.

If this is in fact what you mean, perhaps I am doing something wrong. Should this code be in the same location that @dmwwebartisan mentioned earlier?

Also a bit confused on your spaces comment. My home page has two collections, one titled Curated Collections, and the other titled Shop by Category. Should my code look like this?

{% if collection.handle == "Curated-Collections" %}
Subtext here

{% elseif collection.handle == "Shop-by-Category" %}
Subtext here

{% else %}
{% endif %}

I cannot save this, as I get this error message:

  • Line 8 — Liquid syntax error: Unknown tag ‘elseif’

Thanks

I updated the code in my original response. There was a typo.

You got it right with the collection names. Except it would be lowercase so curated-collections & shop-by-category instead.

Let me know if this solves it for you!

@Jayden-VAIUS

I no longer get the error message with your updated code. However, under both of my collections lists it not just says “Subtext Other Collections here” when I put the code like this:

{% if collection.handle == “curated-collections” %}

Subtext Shirts here
{% elsif collection.handle == "shop-by-category" %}
Subtext Pants here
{% else %}
Subtext Other Collections here
{% endif %}

If I remove this line:

Subtext Other Collections here
, then there is no subtext under my collections lists.

It must not be recognizing the first 4 lines of the code?

bump