Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1211054

    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.

    #1211092

    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.

    #1211232

    Hi jorgepelaez,

    We’re glad to hear that :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Display woocommerce products random’ is closed to new replies.