Order by price, date or title on shop page

Order by price, date or title on shop page WooCommerce support to any WordPress theme:

add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');
 
function custom_default_catalog_orderby() {
     return 'date'; // Can also use title and price
}
See also  Total Download Count Woocommerce

Leave a Reply

Your email address will not be published. Required fields are marked *