All things Shopify and commerce
I am trying to create a section on the home page to show newest products published using the following code, however I am not getting accurate data:
assign all_products = collections.all.products | sort: 'published_at' | reverse
It's just not giving me the latest products compared to when I go to the All Collection sort by Date New to Old
Here is how I am rendering the products:
{% liquid for product in all_products limit: section.settings.limit render 'product-item', product: product endfor %}
What could be the issue?
This worked but I had to create a collection called Newest Products that listed all products for it to work.
Any reason this didnt work with the All collection?
Thank you.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025