Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Looking to use a custom metafield I created "metafields.custom.collectionh1" to display custom collection titles on collection pages. How do I do this?
Current code looks like this:
<header class="section-header">
{% if collection.url contains 'couches' %}<h1>{{ collection.title }}</h1>
{% elsif collection.url contains 'couch-accessories' %}<h1>{{ collection.title }}| Treatment Couches</h1>
{% elsif collection.url contains 'massage-table' %}<h1>{{ collection.title }} | Treatment Couches |</h1>
{% else %}
<h1 class="section-header--title h1">{{ collection.title }}</h1>
{% endif %}
<div class="rte rte--header">
{{ collection.description }}
</div>
</header>
https://www.physioworldshop.co.uk/collections/treatment-couches
hi,
replace following line
{% if collection.url contains 'couches' %}<h1>{{ collection.title }}</h1>
with following
{% if collection.url contains 'couches' %}<h1>{{ collection.metafields.custom.collectionh1 }}</h1>