How to add collection tag with link to each collection page in product page Dawn theme ?

Solved

How to add collection tag with link to each collection page in product page Dawn theme ?

ocelot
Tourist
9 0 3

Hello everyone, i hope you all doing well

I can't find a way to add collections tags to product page in Dawn theme, and tags with links to each collection page that product belong. 

Like this one in screenshot : 

64.png

Accepted Solution (1)

Bundler-Manuel
Astronaut
966 49 111

This is an accepted solution.

Hey @ocelot  Check out the steps and codes given by Kate here which was accepted as a solution in this thread https://community.shopify.com/c/shopify-design/how-to-add-a-link-to-the-brand-collection-on-product-...

Emmanuel
Please let me know if it works by marking it as a solution!
Bundler - Product Bundles app, a great bundle app for Shopify, with glowing user testimonials and a free plan.

View solution in original post

Replies 4 (4)

Bundler-Manuel
Astronaut
966 49 111

This is an accepted solution.

Hey @ocelot  Check out the steps and codes given by Kate here which was accepted as a solution in this thread https://community.shopify.com/c/shopify-design/how-to-add-a-link-to-the-brand-collection-on-product-...

Emmanuel
Please let me know if it works by marking it as a solution!
Bundler - Product Bundles app, a great bundle app for Shopify, with glowing user testimonials and a free plan.
ocelot
Tourist
9 0 3

Hi @Bundler-Manuel 

Thanks a lot it worked !!

tim
Shopify Partner
4329 500 1589

You can easily do it without editing theme code, just by using "Custom Liquid" block or section.

{% if product.collections.size > 0 %}
  <p class="product__text inline-richtext">
    Collections: 
    {% for c in product.collections %}
      <a class="link" href="{{ c.url }}">
      {{ c.title }}
      </a>
      {% unless forloop.last %}, {% endunless %}
    {% endfor %}
  </p>
{% endif %}
If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
ocelot
Tourist
9 0 3

Hi @tim 

Thanks a lot for you time and for relying, the solution above worked just fine