Ele custom skin post(woocommerce) loop sort by price function doesnt work
-
add_filter(‘woocommerce_get_catalog_ordering_args’, ‘am_woocommerce_catalog_orderby’);
function am_woocommerce_catalog_orderby( $args ) {
$args[‘meta_key’] = ‘_price’;
$args[‘orderby’] = ‘meta_value_num’;
$args[‘order’] = ‘desc’;
return $args;
}Using this doesnt work on my current query. Is there any way to sort post current query.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Ele custom skin post(woocommerce) loop sort by price function doesnt work’ is closed to new replies.