Creating a custom product slider - how can I sort the products randomly?

So I have the following liquid code to create a custom product slider which is working great:

{% paginate collections['everything-kitchen'].products by 20 %}
        {% for product in collections.everything-kitchen.products %}

I’m looking to basically randomize the products instead of the default sort by options from the edit collection page, I can re order the

  • 's generated using JavaScript but I’m hoping there is a Shopify/liquid or maybe a better JS solution to this as the JavaScript method I’m using currently only reorders the same 20 products?

    Would greatly appreciate any help with this!

    Thanks in advanced.

  • Hello,

    Did you ever find a solution to this? I’m looking to do something similar.

    Thank you!