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.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025