Testimonial Plugin
January 31st, 2011 by Mike
So many of my clients rely on Testimonials on their site. And usually a simple page, or often posts are used for the process. However, there are major drawbacks to using either. The main one being that they are ordered according to entry, and thus when one opens the page they see the same ones in the same order until it is manually changed. Not good.
So, I figured I would see what plugins might exist. so I searched for “random testimonials” and was surprised at the number or results. That lead to the tedious task of testing each one. What I found was not a single one randomized the testimonials when placed on a page. However, in reading through the posts for one of the plugins I found someone who had kindly figured out a way to fix the problem and make it work. Now, hopefully, the author takes this into consideration and updates the plugin accordingly on his next update. Given the edits, the plugin now works great and provides great flexibility when it comes to styling as you can customize both the html and css from within.
The plugin is LTW – Testimonials by LessThanWeb.
For those wanting to give it a try, install the plugin as usual. Then Edit the following two files:
1)pages/testimonials_settings.php – This creates an “Random Order” option
- goto line 25, you should see the form options. Add the following option after the </option> tag for option 3
<option value=”4″<?php echo get_option(‘ltw_tes_sort_testimonials’) == ’4′ ? ‘ selected=”selected”‘ : ”; ?>><?php _e(‘Random Order’, LTW_TES_UNIQUE_NAME); ?></option>
- Save
2) ltw-testimonials.php This adds the code to sort by random
-goto the bottom of the page and search up for the “ltw_tes_shortcode_all() function”
- add the following code after the closing ‘}’ for option 3
else if (get_option(‘ltw_tes_sort_testimonials’) == ’4′)
{
$ltw_testimonials_order_sql = ‘ ORDER BY RAND() ‘;
}
- Save
And you are good to go.
