Hi, I’m working on the site sillygeorge.com, and I created a metafield for a product subtitle, and I’m trying to make the subtitles show up on the collection pages. Here’s a page example I’m talking about, and I want to have the product subtitle show up where I drew the blue in this screenshot, under the price. How do I add that?
Topic summary
A user wants to display product subtitles beneath prices on collection pages for their Shopify store using the Motion theme. They’ve already created a metafield for subtitles but need implementation guidance.
Proposed Solution:
- Access theme code via Shopify Admin → Online Store → Edit Code
- Locate the collection template file (collection.liquid or main-collection.liquid)
- Find where product price renders and insert custom Liquid code to display the subtitle metafield
- Create the metafield definition: Settings → Metafields → Products → Add Definition
- Set up as “Subtitle” with type “Single Line text”
- Populate subtitle values for each product individually
One responder provided specific code snippet using product.metafields.custom.subtitle to conditionally display the subtitle when present. Another noted the code may have been added to some templates but not others, suggesting inconsistent implementation across the site.
We’ll need to do this using metafields, because you want a different subtitle for each product.
For that, we’ll have to add some custom code in the theme.
Hello @jasminsharp97 ,
I hope you are well!
I think that code has been added to some template and to others it has not been added.
Hey @jasminsharp97,
Thanks for posting this to Shopify community.
If you need help with adding the custom text under the product price on the product card then you need to follow these steps.
Go to Shopify Admin >> Online Store >> Edit Code >> collection.liquid or main-collection.liquid [it based on your theme file structure].
Once you find the main file of the collection then you have to search the term that render the price. You can search for Price. After that of the price rendering you need to paste the following code below.
{% if product.metafields.custom.subtitle != blank %}
<p style="margin-top: 5px; text-align: center;">
{{ collection.metafields.custom.subtitle }}
</p>
{% endif %}
Now you have the code. It’s time to create the metafield. For the metafield you need to follow these steps.
Go to Shopify Admin >> Settings >> Metafields and metaobjects >> Products >> Add Definition
While in the metafiled section you need to write the name as Subtitle. Leave the Description empty and then in the Select Type you have to select Single Line text.
After that click on save. Now visit the each product and then enter the title that you want.
I hope this might help you.
If this was helpful mark as Solution and like it.
Thanks
