Created
June 27, 2016 14:40
-
-
Save organizm/545d1b66fd78c0d1442229f0e1e788c0 to your computer and use it in GitHub Desktop.
WooCommerce - Change default catalog sort order #woocommerce #wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter('woocommerce_default_catalog_orderby', 'imperialfashion_custom_default_catalog_orderby'); | |
function imperialfashion_custom_default_catalog_orderby() { | |
return 'date'; // Can also use title and price | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment