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.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024