Title: Shortcode for Excerpts
Last modified: August 21, 2016

---

# Shortcode for Excerpts

 *  Resolved [hitenmehta34](https://wordpress.org/support/users/hitenmehta34/)
 * (@hitenmehta34)
 * [13 years ago](https://wordpress.org/support/topic/shortcode-for-excerpts/)
 * Hello,
 * Can anyone help me with the shortcode please. I need to display testimonials 
   excerpts only. I am not using the widget section. I am putting it on the homepage.
 * Thank You
 * [http://wordpress.org/extend/plugins/testimonial-rotator/](http://wordpress.org/extend/plugins/testimonial-rotator/)

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

 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [13 years ago](https://wordpress.org/support/topic/shortcode-for-excerpts/#post-3750233)
 * Unfortunetly there is now way to do this without modifying the plugin. If you
   want to do it, go into
 * wp-content/plugins/testimonial-rotator/testimonial-rotator.php
 * change line 429 from
 * `$slide .= " <div class=\"text\">" . apply_filters( 'the_content', get_the_content())."
   </div>\n";`
 * to
 * `$slide .= " <div class=\"text\">" . get_the_excerpt() . "</div>\n";`
 *  [Frank S](https://wordpress.org/support/users/frankswebsites/)
 * (@frankswebsites)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-for-excerpts/#post-3750348)
 * Hi Hal and others,
 * I had a problem getting the shortcode to display the testimonials in a excerpt
   fashion, using for example `[testimonial_rotator id=690 show_size=excerpt limit_length
   =265]`
 * Based on Testemonial Rotator Version 1.3.7 I got it to work.
    Not sure if this
   is the best solution since I am not an experienced developer, but this worked
   for me. I’m open to feedback from the pro’s 🙂
 * **Modification 1** to testimonial-rotator.php:
    Adding this line at the first
   section of function testimonial_rotator($atts) `$show_size = isset($atts['show_size'])?
   $atts['show_size'] : "";`
 * **Modification 2** to testimonial-rotator.php:
    Replacing this part to function
   testimonial_rotator($atts) `$postcontent=apply_filters( 'the_content', get_the_content());`
 * with
 *     ```
       if ($show_size == "excerpt") {
         $postcontent=apply_filters( 'the_content', get_the_excerpt() ) ;
        }
        else {
         $postcontent=apply_filters( 'the_content', get_the_content() ) ;
       }
       ```
   
 * Hope this helps people out!
 * Would much appreciate it if a solution like this is included in the next version
   of the plugin.
 * Thanks,
    – Frank

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

The topic ‘Shortcode for Excerpts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/testimonial-rotator_b07a88.svg)
 * [Testimonial Rotator](https://wordpress.org/plugins/testimonial-rotator/)
 * [Support Threads](https://wordpress.org/support/plugin/testimonial-rotator/)
 * [Active Topics](https://wordpress.org/support/plugin/testimonial-rotator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/testimonial-rotator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/testimonial-rotator/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Frank S](https://wordpress.org/support/users/frankswebsites/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-for-excerpts/#post-3750348)
 * Status: resolved