Shopify themes, liquid, logos, and UX
I'm trying to add a title inside the featured collection.
in the index.JSOn file, I added the bold code.
"16e24524-2040-41a4-b5ca-3a425d62879b": { "type": "featured-collections", "blocks": { "8e756427-f886-410c-b65a-f8a1f0767ff1": { "type": "collection-slide", "settings": { "color_scheme_text": "text-colors-inverse", "collection": "matching-sets-bikini-kimono", "image": "shopify:\/\/shop_images\/DSF3064_24.jpg", "title": "MATCHING SETS: BIKINI & KIMONO", "subheading": "testing" }
in the card collection, I add the new bold code:
<div class="card-collection__content"> <h3 class="card-collection__title"> {{- title -}} </h3><!-- /.card-collection__title --> <h3>{{- block.settings.subheading -}}</h3> <span class="link card-collection__link"> {{- 'featured-collections.card.link' | t -}} </span> </div>
How can I make it work?
thanks in advance!
https://lbst27pm68ni1o72-52839809193.shopifypreview.com
@orhl1234 Your index.json code is missing JSON closure, here is the corrected code
{
"16e24524-2040-41a4-b5ca-3a425d62879b": {
"type": "featured-collections",
"blocks": {
"8e756427-f886-410c-b65a-f8a1f0767ff1": {
"type": "collection-slide",
"settings": {
"color_scheme_text": "text-colors-inverse",
"collection": "matching-sets-bikini-kimono",
"image": "shopify://shop_images/DSF3064_24.jpg",
"title": "MATCHING SETS: BIKINI & KIMONO",
"subheading": "testing"
}
}
}
}
}
hi there!
here is the full code and it's ending.
it does have a closure, doesn't it?
@orhl1234 Replace your code
Current Code -
<h3>{{- block.settings.subheading -}}</h3>
Replace with this -
{% for block in section.blocks %}
<h3>{{- block.settings.subheading -}}</h3>
{% endfor %}
make sure you write the code in the featured-collections.liquid file.
Please let me know!
It's still not working sadly.
But I put it in the card-product as I found the code of the exciting title, so I just added your code below it.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025