Hyperlink leading the entire product page to vendor's collection

Solved
New Member
2 0 0

Hello community,

 

I am starting to use Shopify for an online bookshop. The vendor category is, of course, the author's name.  The vendor is displayed in each product page, and there is a link leading to all the author's books (I have created the necessary collection), but the issue I have is that the hyperlink is linking not only the vendor, but everything else that's under vendor field - description etc. This is the code I am using in product-price.liquid:


{% if section.settings.show_vendor %}
<div class="price__vendor">
<a href="/collections/{{ product.vendor | handle }}"
<dt>
<span class="visually-hidden">{{ 'products.product.vendor' | t }}</span>
</dt>
<dd>
{{ product.vendor }}
</dd>
</div>
{% endif %}

Must be something I am missing, a closing </a> tag somewhere... My abilities in webdesign are extremely limited, therefore any professional advice would be very helpful. Thank you very much.

0 Likes
Highlighted

Success.

Shopify Partner
247 23 31

Hi, @Jules_T 


Yes, you are missing the closing </a> tag, please try this:

{% if section.settings.show_vendor %}
<div class="price__vendor">
<a href="/collections/{{ product.vendor | handle }}">
<dt>
<span class="visually-hidden">{{ 'products.product.vendor' | t }}</span>
</dt>
<dd>
{{ product.vendor }}
</dd>
</a>
</div>
{% endif %}

 

Let's make the best store!
Contact us at: thepremierstores@gmail.com
0 Likes
Highlighted
New Member
2 0 0

Indeed, this is the solution. Many thanks, @PremierStores! I owe you.

0 Likes