Slider w/ looper and random order not working

I’m trying to create a slider that loops through a custom post type (Testimonials) in Random order so that five or so randomly-selected quotes can be displayed. The looper works, showing five slides pulled from that post type and displaying the ACF content, however the slides/posts appear in Menu Order on the front end, and the order does not change after refreshing. (Maybe I’m misunderstanding how Random works?)

For reference, the Slide Container element is the looper provider, and the Slide element is the consumer (limited to 5 posts)—screenshot of the provider configuration attached. Is there something amiss with my configuration, or can you recommend a better way to accomplish this with a slider/looper setup? Of course let me know if I can provide any further info on my current setup.

Thanks!

Screen Shot 2021-12-07 at 6.09.28 PM

Hi @2020creative,

Thanks for reaching out!

Would you mind sharing your admin credentials so that we can check your setup properly? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • Page URL of where the slider looper is located

You can find the Secure Note button at the bottom of your posts.

Thank you.

Sure thing! Added a secure note with credentials as well as where my slider is located.

Hi @2020creative,

I have checked and found that the Random option is working fine in my local environment. And also found that it does not work with the Post or any post type available on your website. It seems that it might be a problem with caching on WP Engine. I would suggest you clear the Server cache by contacting your Hosting Service provider and let us know if that is resolved or not.

Thanks

Thanks for checking that—just connected with WP Engine support, and for anyone else who might encounter this problem, it turns out that WPE disables ORDER BY RAND() by default. You can enable it via the Wordpress dashboard under WP Engine > Site Settings > Advanced Configuration > Random order ( ORDER BY RAND() ). Did that and the looper/slider now works in random order as intended!

Hi @2020creative,

Glad that it is working now.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.