Support » Plugin: WH Testimonials » [Plugin: WH Testimonials] Reverse order??

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m not the plugin author, but if you’re feeling adventurous and don’t mind a little editing, you might give this a try. – As always, make a backup copy before you edit, just in case it doesn’t work.

    Open /wp-content/plugins/wh-testimonials/wh-testimonials.php in an editor. Near the end of line 412 you will find this;

    order by RAND() LIMIT $Wh_setlimit");

    Try changing it to this;

    ORDER BY wh_id DESC LIMIT $Wh_setlimit");

    …and save your changes. I think that might do what you are asking.

    I tried this and it wasnt successful. Could be I did something wrong but I was pretty sure I did it right. Once I saved the changes it added a testimonial saying thank you for installing WH Testimonial

    @digitaldude400d

    Once I saved the changes it added a testimonial saying thank you for installing WH Testimonial

    That appears to be the default message installed with the plugin. You can delete it from testimonials setup pages in your dashboard.

    Go to Testimonials > Settings > “Number of testimonials to show in sidebar” and change it to a number higher than “1”. Then setup your sidebar widget and the page you want it displayed on.

    Now go back and add some fake testimonials just to test the order. I just created 5 testimonials. test 1, test 2, test 3, etc… be sure to add some information in each “short text” field.

    Visit your side bar. Every time you refresh the page, the order should change because the default is random order.

    Now edit /wh-testimonials.php exactly as I indicated above, and save the changes you made to the file, and exit the editor. Go back to your site and view the testimonials in the sidebar again. They should now be in order from newest to oldest. (test 5, test 4, test 3, test 2…)

    I just tested it on WP 3.4.1, and it seemed to work okay for me.

    Good luck!

    I havent tried this for the widget. I was hoping that this would work in the testimonial page where it shows all the testimonies. Ill look deeper into this and hope I can come up with a solution.

    For descending order on the testimonial page this seems to work for me.

    Line 727 in /wh-testimonials.php

    $tstpage = $wpdb->get_results("SELECT wh_id,wh_clientname,wh_company,wh_text_full,wh_homepage,wh_sfimgurl FROM $table_name WHERE wh_text_full !='' ORDER BY wh_id DESC");

    Thank you so much Clayton this worked perfectly.

    You’re welcome. I’m glad it worked.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WH Testimonials] Reverse order??’ is closed to new replies.