Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I am using Crave theme and trying to display product subtitles. I have created the metafield for this but it is not showing up. I'll need it both in collections and on the product page, but it is not working for some reason.
My website is https://konservaria.ro
Anyone knows why is this happening?
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi @vlad-k
Glad to know the code works for card-product implementation.
Please refer to the video from my youtube channel.
Hope this will help... don't forget to like and mark it as the solution.
Hi @vlad-k
This is Noah from PageFly - Shopify Page Builder App
About this problem, it is because you just defined the value of meta ield without using it.
In this case, if you want it to show on the product and collection page. Please add your metafield code in those both files:
main-product.liquid and card-product.liquid
If you want to show it as a sub-titles you can add it under the heading
Here's how you can get the metafield value by code:
It will be:
{{product.metafields.custom.test_img_src}}
Hope this can help you solve the issue
Best regards,
Noah | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Thanks for the reply. I was hoping the metafield would work without coding, but it's ok as I got used to basic ecommerce features not being readily available on Shopify hahah.
The code in main-product worked. But I would need to edit its css and I can't find the source (because it is not showing as a subtitle, it's currently as large as a main product title). Do you know where I can do this?
Also, unfortunately it didn't work for card-product. I have tried placing the code in several places, maybe I am doing it wrong. Here's where I tried it:
Hi @vlad-k
Wrap the metafield with a div tag and put a class name.
Find the file named base.css or theme.css
Put your class name which will have font size attribute like given below.
._subtitle{font-size:12px}
_subtitle is class name.
Thank you, this worked!
Do you have any idea why the code isn't also working in card-product?
I've uploaded some screenshots in a reply above.
This is an accepted solution.
Hi @vlad-k
Glad to know the code works for card-product implementation.
Please refer to the video from my youtube channel.
Hope this will help... don't forget to like and mark it as the solution.
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024