i want to add subheadings under Products section in Dawn theme
Hey @JT70 ,
Step-by-step Code: Add a Subheading to the featured-collection.liquid
-
- Go to: Online Store > Themes > Edit Code
-
Open this file: sections/featured-collection.liquid
-
Find the block that looks like this:
{%- if section.settings.title != blank -%}
## {{ section.settings.title }}
{%- endif -%}
- Add this code right below it:
{%- if section.settings.subheading != blank -%}
{{ section.settings.subheading }}
{%- endif -%}
- At the bottom of the same file, inside the schema ({ “name”: “Featured collection” … }), add this just before the last closing ] in the “settings” array:
{
"type": "text",
"id": "subheading",
"label": "Subheading",
"default": "Explore our curated products"
}
- Add some CSS to make it look clean:
- Go to assets/base.css (or component-card.css if you’re styling per section) and add:
.collection-subheading {
font-size: 1.1rem;
color: #666;
margin-top: 0.5rem;
margin-bottom: 1.5rem;
text-align: center;
}
If you’d like help implementing it or applying this to other product sections (like main-collection-product-grid.liquid), feel free to reach out — happy to assist further!
Thanks!
Best Regards,
Rajat
Shopify Expert
Hello @JT70 ,
Here are the steps to apply the necessary changes in your Shopify store:
- In your Shopify Admin, navigate to Online Store > Themes > Actions > Edit Code.
- Open your liquid file, locate the desired position where you want the subheading to appear, and paste the code there. Then, add the schema at the bottom of the file.
{% if section.settings.subheading-text != blank %}
### {{ section.settings.subheading-text }}
{% endif %}
{% schema %}
{
"name": "Name of your section",
"settings": [
{
"type": "text",
"id": "subheading-text",
"label": "Add the sub-heading"
}
],
"presets": [
{
"name": "Name of your section"
}
]
}
{% endschema %}
Result
Let me know if you need further assistance!
Hello Rajweb, i dont know hopw to to this, can you help
No worries at all — feel free to reach out via the contact details in my signature below. Thanks!
