WooCommerce product category sorting not working
- This topic is empty.
-
AuthorPosts
-
LaurenGuest
guys, I had this problem recently.
https://wordpress.org/support/topic/product-sorting-order-is-not-working-correct/
seems the Woo guys refused to answer and closed this thread. I don’t know why because many people are seeing this problem come back for many times already.
you choose “sort by latest” and nothing happens!
KathleenGuestseems the sorting is working on the main Shop page and not product category archives, the sorting setting is simply ignored.
GeraldGuestCustomizer >> WooCommerce >> Product Catalog
change the default sorting there.
RobertGuestit doesn’t work. WooCommerce complete ignores it for Category archives. I tried multiple WP themes and all plugins deactivated
NancyGuestWC is bloated af, gets worse and worse
JeanGuesthttps://stackoverflow.com/questions/47627079/sort-products-by-desc-order-in-woocommerce
You might need to manually force this behavior using functions.php snippet
Why? Because WooCommerce, that’s why.
PatrickGuestplease try it:
https://wpml.org/forums/topic/woocommerce-shop-page-sorting-problem/
Go to Woocommerce > Status > Tools and run the Regenerate Product lookup tables option.
AaronGuestI tried regenerate product lookup tables, it didn’t help me. In the OP thread wp.org link, those people also said the same things.
AlanGuestit works kids:
add_filter('woocommerce_get_catalog_ordering_args', 'custom_default_catalog_orderby'); function custom_default_catalog_orderby( $args ) { if(!isset( $_GET['orderby'] ) ) { $args['orderby'] = 'date'; $args['order'] = 'dsc'; return $args; } }
I shared the answer on StackOverflow
SamuelGuestTHAT SNIPPET WORKS 😃
RoyGuestIf you have a woocommerce website – check this plugin and enjoy Free Ajax Products Search . https://wordpress.org/plugins/web2application/
SaraGuest@Roy you should start a new topic
-
AuthorPosts