Title: Testimonials_Widget::get_testimonial_html
Last modified: August 21, 2016

---

# Testimonials_Widget::get_testimonial_html

 *  Resolved [nyoz](https://wordpress.org/support/users/nyoz/)
 * (@nyoz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/)
 * Hi !
 * Thanks for this great plugin and sharing it with the community. 🙂
 * I’ve been browsing your FAQ as I want to order the output of each Testi (putting
   the source before the quote, etc.), and in many tickets you mention the following:
 * > // do stuff… see Testimonials_Widget::get_testimonial_html for default processing
 * But I’ve been searching for this **Testimonials_Widget::get_testimonial_html**,
   I haven’t find it anywhere clearly explained… Am I missing something ?
 * Thanks a lot for your time !
 * [http://wordpress.org/plugins/testimonials-widget/](http://wordpress.org/plugins/testimonials-widget/)

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

 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543280)
 * Thank you for the compliment. It’s my pleasure and how I pay for diapers…
 * Sorry, it’s a clue for developers, not mortals. 😉
 * Check out [https://github.com/michael-cannon/testimonials-widget/blob/2.18.0/includes/class-testimonials-widget.php#L1026](https://github.com/michael-cannon/testimonials-widget/blob/2.18.0/includes/class-testimonials-widget.php#L1026).
 *  Thread Starter [nyoz](https://wordpress.org/support/users/nyoz/)
 * (@nyoz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543309)
 * Thanks a lot for your quick help !
 * So basically I just need to reorder :
 *     ```
       $html = $div_open
                               . $image
                               . $quote
                               . $cite
                               . $extra
                               . $bottom_text
                               . $div_close;
       ```
   
 * And `return $html` in functions.php for each of the views I want to alter ?
 * Cheers !
 *  Thread Starter [nyoz](https://wordpress.org/support/users/nyoz/)
 * (@nyoz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543311)
 * Oh and also set :
    `$disable_quotes = true;`
 * If I want to get rid of the opening and closing commas…
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543341)
 * You good now?
 *  Thread Starter [nyoz](https://wordpress.org/support/users/nyoz/)
 * (@nyoz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543348)
 * I’ll have access to all the code on tomorrow, I’ll keep you updated asap 😉
 *  Thread Starter [nyoz](https://wordpress.org/support/users/nyoz/)
 * (@nyoz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543381)
 * Hi ! It finally worked with :
 *     ```
       // Plugin : Testimonials by Aihrus - custom hook - Alter the output of each testimonial to put the author before quote
       function my_testimonials_widget_get_testimonial_html( $html, $testimonial, $atts, $is_list, $is_first, $widget_number, $div_open, $image, $quote, $cite, $extra, $bottom_text, $div_close ) {
       	$html = $div_open
                   . $cite
                   . $image
                   . $quote
                   . $extra
                   . $bottom_text
                   . $div_close;
   
           return $html;
       }
       add_filter( 'testimonials_widget_get_testimonial_html', 'my_testimonials_widget_get_testimonial_html', 10, 13 );
       ```
   
 * But **beware** : there’s an error on [https://aihrus.zendesk.com/entries/23693433-How-do-I-use-filter-testimonials-widget-get-testimonial-html-](https://aihrus.zendesk.com/entries/23693433-How-do-I-use-filter-testimonials-widget-get-testimonial-html-)
 * $bottom-text instead of $bottom_text (twice) which led to a parse error and crashed
   the global page layout generation.
 * Thanks anyway for your help ! 🙂
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543400)
 * [@nyoz](https://wordpress.org/support/users/nyoz/),
 * Great job figuring out your needed changes via the API.
 * Also, thank you for reporting the code quirk. I’ve fixed it.
 * Ciao!

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

The topic ‘Testimonials_Widget::get_testimonial_html’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/testimonials-widget_c56561.svg)
 * [Testimonials Widget](https://wordpress.org/plugins/testimonials-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/testimonials-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/testimonials-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/testimonials-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/testimonials-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/testimonials-widget/reviews/)

## Tags

 * [output](https://wordpress.org/support/topic-tag/output/)

 * 7 replies
 * 2 participants
 * Last reply from: [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/testimonials_widgetget_testimonial_html/#post-4543400)
 * Status: resolved