Shopify themes, liquid, logos, and UX
Hi there,
can anyone please let me know how to add collection title to my product page so that my products will display what collection they are under.
so below image, I want to add collection title in for each of my product on top of the product title
greatly appreciated if anyone can help
Solved! Go to the solution
This is an accepted solution.
Hello @Chriselle ,
I understand you are looking to display Collection title above the Product title in the Product Detail Page.
For implementing this change you have to add small piece of code in your main-product.liquid file.
Please follow the steps for the desired change -:
1. Online Store -> Themes -> Click On three Dots (Action) -> Edit Code
2. Open main-product.liquid file and add the below shared code at the right place
3.
{% for collection in product.collections %}
<p class="collection-title">{{ collection.title }}</p>
{% endfor %}
I hope the solution helps you.
Thank you.
@Chriselle Hey, thanks for posting here.
use this concept, hope it will work:
<div class="product">
{% for collection in product.collections %}
<h2>{{ collection.title }}</h2>
{% endfor %}
<h1>{{ product.title }}</h1>
<!-- Other product details and markup -->
</div>
This is an accepted solution.
Hello @Chriselle ,
I understand you are looking to display Collection title above the Product title in the Product Detail Page.
For implementing this change you have to add small piece of code in your main-product.liquid file.
Please follow the steps for the desired change -:
1. Online Store -> Themes -> Click On three Dots (Action) -> Edit Code
2. Open main-product.liquid file and add the below shared code at the right place
3.
{% for collection in product.collections %}
<p class="collection-title">{{ collection.title }}</p>
{% endfor %}
I hope the solution helps you.
Thank you.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024