Adding H1 tag to custom liquid template

Solved

Adding H1 tag to custom liquid template

petroffgallery
Visitor
2 0 0

Hi,

 

We are using the Testament theme and our default collections include h1s below the breadcrumbs but we had a custom page template called "collection.linklist.liquid" made which shows all our collections on a page but it does not have an h1 and we've been advised that it should have one.

 

Example of the Linklist page template in action: https://www.petroffgallery.com/collections/ceramic-art

 

Example of the default collection page with h1: https://www.petroffgallery.com/collections/mariana-bolanos-inclan

 

I've tried adding: <h1 class="collection__page-title page-title">abc</h1> and while that does work I don't want ABC to show up but rather the name of the Collection for example "Ceramic Art". Can someone explain how to call or reference the page name to have it display it?

 

Thanks!

 

 

Accepted Solution (1)

swym
Pathfinder
124 25 54

This is an accepted solution.

Hi @petroffgallery

 

To show the collection title on the template with an <h1> tag please use the below code: 

 

<h1 class="collection__page-title page-title">{{ collection.title }}</h1>

 

 

I hope this helps. If my response helped you, please consider giving it a like (👍) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions.

 

Thank you!

 

Regards,
Abhishek from Swym 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries

View solution in original post

Replies 2 (2)

swym
Pathfinder
124 25 54

This is an accepted solution.

Hi @petroffgallery

 

To show the collection title on the template with an <h1> tag please use the below code: 

 

<h1 class="collection__page-title page-title">{{ collection.title }}</h1>

 

 

I hope this helps. If my response helped you, please consider giving it a like (👍) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions.

 

Thank you!

 

Regards,
Abhishek from Swym 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries
petroffgallery
Visitor
2 0 0

Hi Abhishek,

 

Thank you very much! I really appreciate your help.

 

PG