Full List of Rotator Attributes

Here is a complete list of available attributes that can be passed to the Testimonial Rotator through the shortcode or directly called in PHP.

Attribute Default Value
id false
testimonial_id false
extra_classes empty
timeout 5
speed 1
fx fade
shuffle false
limit -1
format rotator
title_heading h2
itemreviewed empty
auto_height calc
vertical_align false
div_selector > div.slide
no_pause_on_hover true
prev_next false
paged false
template default
img_size thumbnail
log false
hide_* false
show_link false
show_size full
link_text Default WordPress (more...)
excerpt_length false

id
Default: false

If defined this should be set to the Rotator ID. If not defined it will grab all Testimonials no matter what Rotator they are assigned to.

[testimonial_rotator id="123"]

<?php testimonial_rotator( array('id' => 123') ); ?>

testimonial_id
Default: false

Grabs a single testimonial and displays it nicely.

[testimonial_rotator testimonial_id="123" template="longform"]

<?php testimonial_rotator( array('testimonial_id' => 123', 'template' => 'longform') ); ?>

extra_classes
Default: empty

You can use this to add extra class names to the rotator so you can style the rotator differently.

[testimonial_rotator extra_classes="homepage-rotator"]

<?php testimonial_rotator( array('extra_classes' => 'homepage-rotator') ); ?>

timeout
Default: 5

This is the amount in seconds that each testimonial will appear.

[testimonial_rotator timeout="10"]

<?php testimonial_rotator( array('timeout' => 10) ); ?>

speed
Default: 1

The amount of time in seconds for the transition between testimonials to take.

[testimonial_rotator speed="5"]

<?php testimonial_rotator( array('speed' => 5) ); ?>

fx
Default: fade

The transition style between testimonials. Options include: fade, fadeOut, scrollHorz, scrollVert, flipHorz, flipVert, none

[testimonial_rotator fx="scrollHorz"]

<?php testimonial_rotator( array('fx' => 'scrollHorz') ); ?>

shuffle
Default: false

Randomize the order of the testimonials.

[testimonial_rotator shuffle="1"]

<?php testimonial_rotator( array('shuffle' => 1) ); ?>

limit
Default: -1

This is the max number of posts (testimonial custom post type) entries to pull for the rotator. The default is all associated testimonials to the rotator. You may want to limit this so the query will load faster.

[testimonial_rotator limit="5"]

<?php testimonial_rotator( array('limit' => 5) ); ?>

format
Default: rotator

You can change the rotator into a list of testimonials.

[testimonial_rotator format="list" paged="1"]

<?php testimonial_rotator( array('format' => 'list', 'paged' => 1) ); ?>

title_heading
Default: h2

The title field is an H2 element by default. Some themes may style this element too big or too small. You can change it to another element here. Include only the name party of the element.

[testimonial_rotator title_heading="h3"]
[testimonial_rotator title_heading="span"]

<?php testimonial_rotator( array('title_heading' => 'h3') ); ?>
<?php testimonial_rotator( array('title_heading' => 'span') ); ?>

itemreviewed
Default: empty

For use with the hReview schema code. This is the item you are selling or being reviewed.

[testimonial_rotator itemreviewed="HalGatewood.com Plugins"]

<?php testimonial_rotator( array('itemreviewed' => 'HalGatewood.com Plugins') ); ?>

auto_height
Default: calc

This setting determines how the height of the rotator will be handled. Because testimonials could be different lengths, the rotator can handle this in different ways.

The only two options that work well (from my testing) are calc and container. Container slides the rotator height to the size of the current testimonial. The problem with this is that it shifts everything below the rotator up and down as the rotator changes.

See the official documentation of Auto Height, if you want more information. There is also a filter available for this function to always set it a specific way: testimonial_rotator_auto_height.

[testimonial_rotator auto_height="container"]

<?php testimonial_rotator( array('auto_height' => 'container') ); ?>

vertical_align
Default: false

Align the testimonials in the center of the rotator space.

[testimonial_rotator vertical_align="1"]

<?php testimonial_rotator( array('vertical_align' => 1) ); ?>

div_selector
Default: > div.slide

If you are creating a custom theme and want to change the rotator slides from a div to a section. You would need to change this value to match your new element.

[testimonial_rotator div_selector="> section"]

<?php testimonial_rotator( array('div_selector' => '> section') ); ?>

no_pause_on_hover
Default: true

By default, if you mouse over the rotator it will keep going about its business. If you set this attribute, it will pause when the user mouses over, giving them time to read the testimonial. What a curtesy.

[testimonial_rotator no_pause_on_hover="1"]

<?php testimonial_rotator( array('no_pause_on_hover' => 1) ); ?>

prev_next
Default: false

Adds the ability to show previous and next buttons on the sides of the rotator.

[testimonial_rotator prev_next="1"]

<?php testimonial_rotator( array('prev_next' => 1) ); ?>

paged
Default: false

When used with the attribute format=’list’ you can page the list of testimonials.

[testimonial_rotator paged="1"]

<?php testimonial_rotator( array('paged' => 1) ); ?>

template
Default: default

Set the template used by the rotator.

[testimonial_rotator template="longform"]

<?php testimonial_rotator( array('template' => 'longform') ); ?>

img_size
Default: thumbnail

This is the size of the image that is used along with the testimonial. You can use some of the standard WordPress image sizes: ‘thumb’, ‘thumbnail’, ‘medium’, ‘large’, ‘post-thumbnail’

Or use a plugin like Simple Image Sizes to create custom sizes in your admin.

[testimonial_rotator img_size="large"]

<?php testimonial_rotator( array('img_size' => 'large') ); ?>

log
Default: false

The testimonial rotator uses the jQuery Cycle 2 functionality to make the rotator work. This plugin has a logging system that helps you know what is going on with the rotator. It will spit things out to your web console.

[testimonial_rotator log="1"]

<?php testimonial_rotator( array('log' => 1) ); ?>

hide_*
Default: false

You can hide different elements of the testimonials in the rotator.

[testimonial_rotator hide_title="1"]
[testimonial_rotator hide_stars="1"]
[testimonial_rotator hide_body="1"]
[testimonial_rotator hide_author="1"]
[testimonial_rotator hide_microdata="1"]
[testimonial_rotator hide_image="1"]

<?php testimonial_rotator( array('hide_title' => 1) ); ?>
<?php testimonial_rotator( array('hide_stars' => 1) ); ?>
<?php testimonial_rotator( array('hide_body' => 1) ); ?>
<?php testimonial_rotator( array('hide_author' => 1) ); ?>
<?php testimonial_rotator( array('hide_microdata' => 1) ); ?>
<?php testimonial_rotator( array('hide_image' => 1) ); ?>

show_link
Default: false

When used with show_size=”excerpt” you can specify if you want a ‘Read More’ link to appear.

[testimonial_rotator show_size="excerpt" show_link="1" link_text="Read All"]

<?php testimonial_rotator( array('show_size' => 'excerpt', 'show_link' => 1, 'link_text' => 'Read All') ); ?>

show_size
Default: full

By default, the rotator will show the full testimonial. You can change this to ‘excerpt’ to show only the excerpt. You can specify the exact excerpt you want in the excerpt field of the testimonial or it will truncate the beginning of the quote.

[testimonial_rotator show_size="excerpt" excerpt_length="35"]

<?php testimonial_rotator( array('show_size' => 'excerpt', 'excerpt_length' => 35) ); ?>

link_text
Default: Default WordPress (more...)

You can set a specific read more link text here when using show_size=”excerpt”

[testimonial_rotator show_size="excerpt" show_link="1" excerpt_length="10" link_text="Read All"]

<?php testimonial_rotator( array('show_size' => 'excerpt', 'show_link' => 1, 'link_text' => 'Read All', 'excerpt_length' => 10) ); ?>

excerpt_length
Default: false

When you use the attribute show_size=”excerpt” you can then use this attribute to set the length.

[testimonial_rotator show_size="excerpt" excerpt_length="55"]

<?php testimonial_rotator( array('show_size' => 'excerpt', 'excerpt_length' => 55) ); ?>