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 %}
By 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, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024