Shopify themes, liquid, logos, and UX
Hello Shopify support community members, I am running an online bookstore using the Shopify platform and I have recently created a metafield for the "author" field in the product section. The metafield is currently visible in the product section, but it is not clickable. I am trying to create a functionality where if a viewer clicks on the author's name in a particular product, it will show all the books by that author that are available in my bookstore. I would greatly appreciate any assistance in making this metafield clickable and creating this functionality. Thank you.
Did you ever achieve this?
Did you ever work out how to do this? I'd like to learn!
Hi @biblionepal !
I couldn't find an answer to your question.
There is an alternative solution - using vendor or tags.
I used this code to make vendor clickable and show all the books by the author.
Go to Online Store -> Customize -> Choose any product -> click Add block -> choose Custom liquid. Add this code (you can write Author instead of Vendor):
{% if product.vendor.size > 0 %}
<b>Vendor:</b>
{% for vendor in product.vendor %}
{% assign vendor_coll = '/collections/all/' | append: vendor %}
{{ vendor | link_to_vendor}}{% unless forloop.last %},{% endunless %}
{% endfor %}
{% endif %}
User | RANK |
---|---|
186 | |
168 | |
80 | |
55 | |
45 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023