Last active
September 20, 2018 09:19
-
-
Save pvphong90/8f6e8db3cc35b6982975d89790d7562c to your computer and use it in GitHub Desktop.
Bỏ đi bộ lọc sản phẩm
This file contains 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
// Tùy chỉnh các tùy chọn sắp xếp sản phẩm WooCommerce | |
// Tùy chọn có sẵn là: menu_order, xếp hạng, ngày, mức độ phổ biến, giá, giá-desc | |
function custom_woocommerce_product_sorting( $orderby ) { | |
// The following removes the rating, date, and the popularity sorting options; | |
// feel free to customize and enable/disable the options as needed. | |
unset($orderby["rating"]); | |
unset($orderby["date"]); | |
unset($orderby["popularity"]); | |
return $orderby; | |
} | |
add_filter( "woocommerce_catalog_orderby", "custom_woocommerce_product_sorting", 20 ); | |
<!-- Hoặc code sau --> | |
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); | |
//Chọn 1 trong 2 code trên nhé |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment