Tagged: enfold, woocommece
Hello again, how can I display woocommerce products random by default?
I’m aware that there’s a sort option but my client wants to show the products random by default.
Any help is appreciated.
Hi again, I found ths snippets that solves the issue:
add_filter(‘woocommerce_get_catalog_ordering_args’, ‘set_sort_order’);
function set_sort_order($args) {
$args[‘orderby’] = ‘rand’;
return ($args);
}
Please consider this ticket as solved.
Hi jorgepelaez,
We’re glad to hear that :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko