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

Solved

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

vlad-k
Excursionist
15 1 7

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!

Accepted Solution (1)
gr_trading
Shopify Partner
1926 145 200

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.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

View solution in original post

Replies 5 (5)

PageFly-Noah
Shopify Partner
1317 233 273

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:

PageFlyNoah_0-1692264062481.png

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.

vlad-k
Excursionist
15 1 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:

 

Screenshot 2023-08-17 at 12.46.33.pngScreenshot 2023-08-17 at 12.45.49.pngScreenshot 2023-08-17 at 12.45.14.png

gr_trading
Shopify Partner
1926 145 200

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.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
vlad-k
Excursionist
15 1 7

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.

gr_trading
Shopify Partner
1926 145 200

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.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee