To access specific collection attributes, you must know collection handle and use this kind of code :
{{ collections['the-handle'].url }}
So to achieve what you want to do, here is what you could do:
{% assign collection_handle = 'the-handle-of-collection-you-want' %}
{% for product in collections[collection_handle].products %}
Do your stuff
{% endfor %}
Note that you cannot access a collection through its title. Only handle.
Learning more about what's handle: https://help.shopify.com/themes/liquid/basics/handle
HTH
Answer from Alice Girard on Stack OverflowTo access specific collection attributes, you must know collection handle and use this kind of code :
{{ collections['the-handle'].url }}
So to achieve what you want to do, here is what you could do:
{% assign collection_handle = 'the-handle-of-collection-you-want' %}
{% for product in collections[collection_handle].products %}
Do your stuff
{% endfor %}
Note that you cannot access a collection through its title. Only handle.
Learning more about what's handle: https://help.shopify.com/themes/liquid/basics/handle
HTH
use dash(-) instead of space in collection name like "sale potions" then it will be "sale-potions"
{% for product in collections['sale-potions'].products %}
{{- product.title | link_to: product.url }}
{% endfor %}
How to Change the URL Handle of the "All" Collection through Code in Shopify?
Why is the collection handle included by default in products URL if it is bad for SEO?
Loop through a collection using a collection ID
How to target a specific collection page on shopify
Videos
For example, I only want the "View The Estate Preparation Package Feature Comparison Chart" link to show on the Estate Preparation Package collection page.
Page where I'm having trouble: https://shop.buriedinwork.com/collections/estate-preparation
I currently have the following Liquid Code on the default collection page: "<div align="center"><a href="https://shop.buriedinwork.com/pages/which-estate-preparation-package-is-right-for-you">View The Estate Preparation Package Feature Comparison Chart</a><div>"
Thanks!