Title: &quot;Random&quot; Call Not Working
Last modified: August 22, 2016

---

# "Random" Call Not Working

 *  Resolved [CBphotography](https://wordpress.org/support/users/cbphotography/)
 * (@cbphotography)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/)
 * No matter what variation of the [strong] short code I use (custom or default),
   I can’t get the “Random” call to work to pull random testimonials to my page 
   with the short code. Instead for example with a call for 3, I will always see
   the 1st, 2nd and third testimonials in order of when they originally were put
   into my system.
 * Current short code…
    [strong class=”three-css-columns” more_post more_text=”read
   more…” length=”330″ count=”3″ category=”548″ random title thumbnail ]
 * Any thoughts?
 * Here is a link to my dev site where I am getting everything read before migrating
   over my domain. [LINK](http://cbrownphoto.wpengine.com/photography-workshops/iceland/)(
   Testimonials at bottom of page)
 * [https://wordpress.org/plugins/strong-testimonials/](https://wordpress.org/plugins/strong-testimonials/)

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

 *  [ehoanshelt](https://wordpress.org/support/users/ehoanshelt/)
 * (@ehoanshelt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824732)
 * Hey!
 * I’m with WP Engine and wanted to see if I could chime in and help here.
 * In wp-admin, go to the WP Engine section of your dashboard and scroll all the
   way to the bottom. (This will be the page where you can purge cache)
 * You will see a toggle for allowing the RAND() function in MySQL to properly execute.
   Here is a screenshot:
 * [http://take.ms/UeaGt](http://take.ms/UeaGt)
 * That should allow your random ordering to work properly. 🙂
 * Thanks!
    Eric
 *  Thread Starter [CBphotography](https://wordpress.org/support/users/cbphotography/)
 * (@cbphotography)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824739)
 * Thanks Eric. That is a big help. Love the support from WP Engine 🙂
 * I see all the warnings about this feature in terms of it slowing things down.
   With a relatively small site, is that something I should worry about?
 *  [ehoanshelt](https://wordpress.org/support/users/ehoanshelt/)
 * (@ehoanshelt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824742)
 * Hey!
 * Small sites should be fine. 🙂
 * As you post table grows (Testimonials het stored in the same table as posts, 
   pages, etc) you may start seeing a performance hit. But as long as your site 
   is small with a low amount of traffic, RAND() should be fine.
 * Thanks!
    Eric
 *  Thread Starter [CBphotography](https://wordpress.org/support/users/cbphotography/)
 * (@cbphotography)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824746)
 * Whats “low”? 🙂
 * Is there any solution to allow random testimonials with this plugin to work without
   having it affect the performance of my site. My testimonials shouldn’t reach 
   more than a couple hundred and as far as web traffic, less than 100k a month.
 *  [ehoanshelt](https://wordpress.org/support/users/ehoanshelt/)
 * (@ehoanshelt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824761)
 * Without getting to much into numbers because a lot of factors are in play when
   it comes to scalability of the site. If it is a couple hundred a month, I feel
   comfortable saying your site should be fine.
 * I would take a webpagetest.org snapshot of the site performance now before turning
   on Rand() and then again in a few days to see if you see a huge spike in performance.
 * > Is there any solution to allow random testimonials with this plugin to work
   > without having it affect the performance of my site.
 * NERD TALK AHEAD:
    I’ll let the developer answer that question but to offer a 
   suggestion to him/her/team, if the order by rand() is an essential feature of
   the plugin, remove any use of the rand() function in MySQL and let PHP handle
   it. Pull all the testimonials from the database and output random one via PHP
   from the MySQL response. MySQL Indexes that are installed by default In WordPress
   should make sure that MySQL outputs the information quickly while PHP can randomize
   the testimonials in a more productive way.
 * Now, the plugin developer may not have intentionally used the RAND() function,
   rather the orderby => ‘rand’ argument in WP_QUERY. This will cause the function
   to be used in MySQL.
    END NERD TALK
 * I hope this helps!
 *  Thread Starter [CBphotography](https://wordpress.org/support/users/cbphotography/)
 * (@cbphotography)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824764)
 * Very helpful. Thanks again!
 * I will wait to hear from the developer before marking this as resolved:)
 *  Plugin Contributor [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * (@cdillon27)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-call-not-working/#post-5824780)
 * Thanks for the advice and for stepping in Eric, that would have taken me days
   to figure out.
 * I am indeed using `orderby => rand` and I am very curious to know at what point
   it affects performance.
 * But the PHP technique is sound and I will change the plugin soon.
 *  Plugin Contributor [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * (@cdillon27)
 * [11 years ago](https://wordpress.org/support/topic/random-call-not-working/#post-5825068)
 * Random order has been moved from SQL to PHP in version 1.16. You can disable 
   MySQL RAND() in your WP Engine settings.

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

The topic ‘"Random" Call Not Working’ is closed to new replies.

 * ![](https://ps.w.org/strong-testimonials/assets/icon-256x256.png?rev=3134855)
 * [Strong Testimonials](https://wordpress.org/plugins/strong-testimonials/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/strong-testimonials/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/strong-testimonials/)
 * [Active Topics](https://wordpress.org/support/plugin/strong-testimonials/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/strong-testimonials/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/strong-testimonials/reviews/)

## Tags

 * [Short Code](https://wordpress.org/support/topic-tag/short-code/)

 * 8 replies
 * 3 participants
 * Last reply from: [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/random-call-not-working/#post-5825068)
 * Status: resolved