Title: Random sorting not working
Last modified: January 30, 2019

---

# Random sorting not working

 *  [tuttolaurea](https://wordpress.org/support/users/tuttolaurea/)
 * (@tuttolaurea)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/random-sorting-not-working/)
 * After updating to Avada 5.8 Woocommerce 3.5.4, the random sorting is not working
   anymore.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * (@skyverge)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/random-sorting-not-working/#post-11156088)
 * Hey [@tuttolaurea](https://wordpress.org/support/users/tuttolaurea/),
 * Thanks for reaching out to us about our plugin!
 * It sounds like there may be a conflict with the latest version of Avada. Could
   you share your website URL with me so I can have a look and see if there are 
   any JavaScript errors which could explain the issue?
 * In addition, it would be good to check for PHP errors as well. Could you please
   enable WP Debug Mode? To do so, you would need to edit the `wp-config.php` file.
   Near the bottom of this file you’ll find a line that looks like the following:
 *     ```
       define( 'WP_DEBUG', true );
       ```
   
 * What we’d need to see here is the following three lines:
 *     ```
       define('WP_DEBUG',         true);
       define('WP_DEBUG_LOG',     true);
       define('WP_DEBUG_DISPLAY', false);
       ```
   
 * If you already have those three lines in your `wp-config.php` file, would you
   please ensure that `WP_DEBUG` and `WP_DEBUG_LOG` are set to `true` and `WP_DEBUG_DISPLAY`
   is set to `false` ?
 * Once debug mode is turned on WordPress will start logging all PHP errors to a
   file called `wp-content/debug.log`. At this point, please try using the random
   sorting once more and take a look at the file to see if any of the errors could
   point you to a reason for the issue. I’d be happy to have a look as well if you’d
   like to share the file using a tool like [Snippi](http://snippi.com).
 * Thanks,
 * Tamara
 *  Plugin Author [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * (@skyverge)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/random-sorting-not-working/#post-11159826)
 * Hey [@tuttolaurea](https://wordpress.org/support/users/tuttolaurea/),
 * Tamara again 🙂 One of my colleagues brought up that randomized sorting was removed
   in v2.5.0 of the plugin which was released back in July 2016. Did you recently
   update from an old version of our plugin?
 * Here’s the explanation from the [plugin’s description](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/):
 * >  We removed randomized product sorting some time ago because it wasn’t 100%
   > functional for many shops (as it required all products to be on one page), 
   > and thus is better served as custom code snippet instead of being part of this
   > plugin.
   > **Why didn’t it work?** WordPress will get a new random set of products for
   > each page in your shop, so random sorting only works at 100% when you have 
   > a small number of products and they’re all displayed on one page. In order 
   > to “remember” which products have already been displayed, you’d need [some custom code](http://wordpress.stackexchange.com/questions/31647/is-it-possible-to-paginate-posts-correctly-that-are-random-ordered)
   > to store these products in a session, which is not something we ever planned
   > to support as it isn’t possible with the structure of this plugin.
   > Since this feature wasn’t at 100%, we have removed it and turned it into a 
   > code snippet. If you need to re-add randomized sorting, please [use this code snippet](https://gist.github.com/bekarice/bac8b67064001ebc3bc2475424d99f87),
   > ensuring that you [know how to add code to your site](http://skyverge.com/blog/add-custom-code-to-wordpress/).
 * I hope that’s helpful! Could I help you with any other questions?
 * Cheers,
 * Tamara

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Random sorting not working’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-extra-product-sorting-options/assets/icon-256x256.
   png?rev=3303778)
 * [Extra Product Sorting Options for WooCommerce](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/random-sorting-not-working/#post-11159826)
 * Status: not resolved