Why isn't my product subtitles metafield displaying in Crave theme?

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!

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

1 Like

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.

1 Like

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.

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.

1 Like