Khi chúng ta nâng cấp lên WooCommerce 3, sẽ gặp rất nhiều vấn đề xảy ra, 1 trong số đó là ở trang danh mục sản phẩm các sản phẩm sẽ hiển thị không đúng thứ tự mà ta mong muốn, Ở bài này, Zubi Cloud chia sẻ cho bạn cách để sắp xếp lại trang danh mục sản phẩm, chúng sẽ được hiển thị theo thứ tự: sản phẩm nào mới đăng thì sẽ hiển thị lên đầu, theo tuần tự
- Cách sắp xếp hiển thị thứ tự bài mới nhất trong WooCommerce 3, bạn chỉ cần chèn đoạn code sau vào file functions.php
add_filter('woocommerce_get_catalog_ordering_args', 'am_woocommerce_catalog_orderby'); function am_woocommerce_catalog_orderby( $args ) { $args['order'] = 'desc'; return $args; }
There is evidently a bunch to realize about this. I feel you made certain nice points in features also.
I’ve recently started a blog, the info you offer on this site has helped me greatly. Thank you for all of your time & work. “So full of artless jealousy is guilt, It spills itself in fearing to be spilt.” by William Shakespeare.