Shopify show product list based on their publish date either ascending or descending order in front end.

Highlighted
New Member
1 0 0

Hi Everyone,

I want to list my all the products by their published date so that I can show the latest products at the top of the list.

Right now products being listed alphabetically.

All the products list alphabetically when I loop through like this:

{% for product in collection.products %}
    {% include 'product-list-item' %}
  {% endfor %}

Is there any way to list them by their published date?

Thanks in advance.

Sandeep

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
269 1 26

Hi, Sandeep!

Stephanie here from Shopify. :)

You don't need to touch any code to make this change as the option to sort by newest to oldest (in terms of published date) is within each collection. 

Within the collection, you can change the sort option here:

Hope this is helpful! If you have any other questions, feel free to reach out to our support, we're available 24/7!

Cheers!

Stephanie | Shopify Support
0 Likes
Highlighted
Shopify Expert
540 24 118

That collection sorting option does not sort by published date, but by created date.

★ ThemeUp: Nifty Upgrades for your Shopify Store ★ https://themeup.net
Highlighted
New Member
4 0 0

any answer to the question?

0 Likes
Highlighted
Shopify Partner
88 3 10

Can try our app Advanced Collections - https://apps.shopify.com/advanced-custom-collections - you can choose individual or all collections to sort by published date, and the app will automatically sort it every hour or so. There is a 7-day free trial too, do try it out!

0 Likes