How to set default shop product sorting to “Oldest to Newest”

This topic has 2 replies, 2 voices, and was last updated 6 hours, 31 minutes ago ago by Jack Richardson

  • Avatar: lukabp
    lukabp
    Participant
    September 8, 2026 at 19:09

    Hi ,
    I am trying to set the default product sorting in my WooCommerce shop page so that products are displayed from oldest to newest by default.
    When I go to Appearance > Customize > WooCommerce > Product Catalog, the drop-down menu for Default product sorting only shows the standard options:
    -Default sorting (custom ordering + name)
    -Popularity (sales)
    -Average rating
    -Sort by most recent
    -Sort by price (asc/desc)
    There is no option to set the default sorting by date ascending (oldest first).
    How i can to sort products on shop page oldest to newest?

    Thank you for help.
    Best regards,
    Luka

    Content is visible for topic creator and
    support staff only.
    1 Answer
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 9, 2026 at 06:08

    Hello @lukabp,

    By default, WooCommerce does not provide an “Oldest first” option in Appearance → Customize → WooCommerce → Product Catalog → Default product sorting.

    You can add this sorting option using a small custom code snippet:

    add_filter( 'woocommerce_default_catalog_orderby_options', 'etheme_custom_add_oldest_orderby_option' );
    add_filter( 'woocommerce_catalog_orderby', 'etheme_custom_add_oldest_orderby_option' );
    
    function etheme_custom_add_oldest_orderby_option( $options ) {
    	$options['date-asc'] = 'Sort by oldest';
    	return $options;
    }

    After adding the code, go to:

    Appearance → Customize → WooCommerce → Product Catalog → Default product sorting

    and select:

    “Sort by oldest”

    This will sort products on the Shop and product archive pages from the oldest published products to the newest ones.

    We have implemented the solution on your web-site in child-theme/functions.php, so the modification is not lost after theme updates. please, check now.

    Theme Settings: https://gyazo.com/2f858105a116a8173c7f0b96d09ed0d1
    Frontent example: https://gyazo.com/a08e9a61d2176f4226a323cb480d172d

    Also, you can check similar solutions for other sorting types in our replies:
    https://www.8theme.com/topic/list-of-woocommerce-products-shorted-as-per-the-date-modified/#post-414825
    https://www.8theme.com/topic/having-problem-with-default-sorting-of-the-products/#post-325616

    Kind regards,
    Jack Richardson
    The 8theme’s team

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.