Last active
June 20, 2018 18:50
-
-
Save pablo-sg-pacheco/1caffffda20360ddf68e970c3b8dc71d to your computer and use it in GitHub Desktop.
Add compatibility with WOOF plugin and More Sorting Options for WooCommerce regarding title sorting option
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 | |
// Add these cases on get_catalog_orderby() function on index.php | |
case 'title-desc': | |
$orderby = "title"; | |
$order = 'DESC'; | |
break; | |
case 'title-asc': | |
$orderby = "title"; | |
$order = 'ASC'; | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More Sorting Options for WooCommerce
WOOF - Woocommerce Products Filter