Testimonials by WooThemes
[resolved] Sidebar widget - Show random testimonials (6 posts)

  1. yosefklein
    Posted 2 years ago #

    I set up this plugin as a side bar widget.
    I entered 20 testimonials.
    Now I want to limit the plugin to show only 2 testimonials (this is a simple setting in the widget settings). However, i want the testimonials to display randomly.
    Meaning, each time you refresh the page it should display 2 different testimonials.


  2. mattdeanuk
    Posted 2 years ago #

    <?php do_action( 'woothemes_testimonials', array( 'limit' => 2, 'orderby' => rand ) ); ?>

    Should do it.

  3. lilfairie
    Posted 2 years ago #

    I want to do the same thing. Where should that code be placed?

  4. elevate5
    Posted 2 years ago #

    @lilfairie - I just used this plugin to add it to a php code widget (just like the handy text widget for HTML), and it worked perfect:


  5. mattdeanuk
    Posted 1 year ago #

    @lilfairie Soryr, just seen this, did you get it working?
    You just needed to paste it into your theme where you want it to appear.

  6. jameskoster
    Plugin Author

    Posted 1 year ago #

    The widget should allow you to do this by default. I just tested it and it's working fine here.

    The code mattdeanuk gave you should be included in a template file, if you prefer to do things that way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Testimonials by WooThemes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic