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.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025