FAQ

1. How do I use the theme functions `testimonialswidget_list()` and `testimonialswidget_widget()`?

In your theme’s functions.php file, place code similar to the following for the configuration you need.

A basic testimonial list or widget with no options.

<?php echo testimonialswidget_list(); ?https://aihr.us/files/testimonials-widget/>
<?php echo testimonialswidget_widget(); ?https://aihr.us/files/testimonials-widget/>

Testimonial list or widget with options.

<?php
// The following argument configuration selects 5 testimonials of the "product" category, having the "widget" tag.
// $args is an optional array of desired shortcode options
$args                           = array(
    'category'                    =https://aihr.us/files/testimonials-widget/> 'product',
    'tags'                        =https://aihr.us/files/testimonials-widget/> 'widget',
    'limit'                       =https://aihr.us/files/testimonials-widget/> 5,
);
// Displays the testimonials as a list into your theme directly
echo testimonialswidget_list( $args );
// The following argument configuration selects testimonials of the "review" tag and sets a slower rotation speed for the display widget
$args                           = array(
    'tags'                        =https://aihr.us/files/testimonials-widget/> 'review',
    'refresh_interval'            =https://aihr.us/files/testimonials-widget/> 15,
);
// Displays the testimonials as a rotating widget into your theme directly
echo testimonialswidget_widget( $args );
// $widget_number is an optional, arbitrarily number (probably safe between 1,000 and 9,999) that helps create a uniquely identifiable testimonials widget display instance.
$widget_number                  = 1234;
// Displays the testimonials as a rotating widget into your theme directly  with specific class .testimonialswidget_testimonials1234
echo testimonialswidget_widget( $args, $widget_number );
?https://aihr.us/files/testimonials-widget/>

In case of Fatal error: Call to undefined function testimonialswidget_widget() in…, please try including testimonials-widget.php like the following.

<?php 
include_once( WP_PLUGIN_DIR . '/testimonials-widget/testimonials-widget.php' );
echo testimonialswidget_widget(); 
?https://aihr.us/files/testimonials-widget/>

2. How do you include the actual testimonials for the widget? Where do I quote my customers? I mean, where do I enter the actual text?

In WordPress Admin https://aihr.us/files/testimonials-widget/> Testimonials. See screenshot 1.

Basically, look down the left side of your WordPress admin area for the Testimonials section. Click on that section link, then click “Add new testimonial” at top to add quotes.

3. How do I filter the testimonials data before display processing?

function my_testimonials_widget_data( $data ) {
    if ( empty( $data ) )
        return $data;
    foreach( $data as $key =https://aihr.us/files/testimonials-widget/> $testimonial ) {
        // do something with the $testimonial entry
        // the keys below are those that are currently available
        // 'testimonial_extra' is the key in which you can put in your own custom content for display
        $testimonial            = array(
            'post_id'             =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_source'  =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_company' =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_content' =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_email'       =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_image'       =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_url'     =https://aihr.us/files/testimonials-widget/> …,
            'testimonial_extra'       =https://aihr.us/files/testimonials-widget/> …,
        );
        $data[ $key ]           = $testimonial;
    }
    return $data;
}
add_filter( 'testimonials_widget_data', 'my_testimonials_widget_data' );

Do note that content truncation might still remove your appended content if you’re usingchar_limit.

Content of testimonial_extra is appended after the closing cite tag within the testimonial with CSS class testimonialswidget_extra.

4. How do I change the image size?

The default image size is based upon Thumbnail size in Media Settings. If changing that doesn’t work for you, then use add_filter in your theme’s functions.php file to adjust the image size.

add_filter( 'testimonials_widget_image_size', 'my_testimonials_widget_image_size' );
function my_testimonials_widget_image_size( $size ) {
    $size                       = array( 120, 90 );
    return $size;
}

You can use either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32).

I recommend putting your theme customizations into a custom-functions.php file and then include that in your theme’s functions.php file via include 'custom-functions.php';.

5. How do I change the Gravatar size?

Use an add_filter in your theme’s functions.php file to adjust the Gravatar size.

add_filter( 'testimonials_widget_gravatar_size', 'my_testimonials_widget_gravatar_size' );
function my_testimonials_widget_gravatar_size( $size ) {
    $size                       = 120;
    return $size;
}

Default Gravatar size is 96, maximum 512.

6. What CSS applies to testimonials container?

See FAQ 34/35 for more specific HTML layout and CSS presentation information.

CSS class testimonialswidget_testimonials wraps all testimonials. Additionally, shortcode lists are wrapped by testimonialswidget_testimonials testimonialswidget_testimonials_list.

7. What CSS applies to single testimonial container?

See FAQ 34/35 for more specific HTML layout and CSS presentation information.

CSS class testimonialswidget_testimonial wraps a single testimonial. Additionally, single shortcode list tems are wrapped bytestimonialswidget_testimonial testimonialswidget_testimonial_list.

8. How can I add the testimonials plugin to any where on the site? ie. somewhere other than the side bar like the contact page etc.?

See the “Shortcode Examples”, “Theme Function testimonialswidget_list()” and “Theme Function testimonialswidget_widget()” onhttp://wordpress.org/extend/plugins/testimonials-widget/.

9. How do I hide the comma after the source?

Use CSS.

.testimonialswidget_testimonial .testimonialswidget_join_location,
.testimonialswidget_testimonial .testimonialswidget_join_title,
.testimonialswidget_testimonial .testimonialswidget_join {
    display: none;
}

10. Testimonials widget is not showing or rotating

The usual problem is that jQuery is included twice. Once by WordPress and again by a theme. Remove the jQuery version included by your theme and you should be fine.

11. I’m not seeing any testimonials but the title

If you’re not seeing any testimonials, even when not using tags filter, you might try increasing the Character limit or setting it to ’0′ or ‘none’ in the widget box.

12. How do I apply custom CSS to a specific testimonial widget?

The easiest thing is to check the source code of your page with the widget and look for the testimonial widgets div container id tag. It’ll be something likeid="testimonials_widget-3".

Then, in your theme’s custom.css or styles.css file write CSS like the following.

#testimonials_widget-3 {
    color: red;
}
#testimonials_widget-3 cite {
    color: black;
}

13. How to get rid of the quotation marks that surround the random quote?

In your theme’s custom.css or styles.css file write the following CSS.

.testimonialswidget_testimonial .testimonialswidget_open_quote:before,
.testimonialswidget_testimonial .testimonialswidget_close_quote:after {
    display: none;
}

14. How to change the random quote text color?

Styling such as text color, font size, background color, etc., of the random quote can be customized by editing your theme’s styles.css file to apply CSS like the following.

.testimonialswidget_testimonial q {
    color: blue;
}

15. How can I style the shortcode testimonials?

See FAQ 34/35 for more specific HTML layout and CSS presentation information.

Each shortcode testimonial is wrapped by a div using classestestimonialswidget_testimonial testimonialswidget_testimonial_list. As such, to increase spacing between testimonials, try…

.testimonialswidget_testimonial_list {
    padding-bottom: 1em;
}

Making the citation line a different color is a little trickier. The reason being is that applying a color to .testimonialswidget_testimonial cite will change the entire citation line in the widget display as well. To only change the shortcode testimonial citation color, try…

.testimonialswidget_testimonial_list cite {
    color: blue;
}

If you’re wanting to change only the company or URL color, then try.

.testimonialswidget_testimonial_list cite .testimonialswidget_company {
    color: purple;
}

Like wise, the source uses class testimonialswidget_source.

16. How do I change the join “, ” text?

In CSS, revise the join content like the following.

.testimonialswidget_testimonial .testimonialswidget_join:before {
    content: " | "
}

17. Who can edit testimonials?

All users can see and use the testimonials system. However, only users withedit_others_posts ability get to set author or edit other author’s testimonials.

18. How do I put the title or location on a separate line?

In CSS put the following.

.testimonialswidget_testimonial .testimonialswidget_join_location,
.testimonialswidget_testimonial .testimonialswidget_join_title {
    display: none;
}
.testimonialswidget_testimonial .testimonialswidget_location,
.testimonialswidget_testimonial .testimonialswidget_title {
    display: block;
}

19. How do I put company details on a separate line?

In CSS put the following.

.testimonialswidget_testimonial .testimonialswidget_join {
    display: none;
}
.testimonialswidget_testimonial .testimonialswidget_company,
.testimonialswidget_testimonial .testimonialswidget_url {
    display: block;
}

20. After upgrading, testimonial rotations have stopped

The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires wp_footer() in the footer. Check to make sure your theme has the <?php wp_footer(); ?https://aihr.us/files/testimonials-widget/> call in footer.php or the equivalent file.

Alternately, enable Developer Mode in your browser, right-click on a testimonial, select “Inspect Element”, and then click on the Console tab to review and resolve the JavaScript errors.

21. How can I justify testimonials text?

To justify all testimonials try…

.testimonialswidget_testimonial {
    text-align: justify;
}

To justify only the testimonials list try…

.testimonialswidget_testimonial_list {
    text-align: justify;
}

22. Do testimonials have there own URL?

Testimonial Widgets records are a custom post type and therefore can be viewed via a URL like http://www.example.com/testimonial/michael-cannon-senior-developer/.

When you look at the WP https://aihr.us/files/testimonials-widget/> Admin https://aihr.us/files/testimonials-widget/> Testimonials post list, you can click on the View link to see the testimonial in full.

The filters testimonials_widget_testimonial_html_single andtestimonials_widget_testimonial_html_single_content are related to the single view.

Please purchase Testimonials Widget Premium to get “Read more” link capability or use the filters to create your own.

23. My testimonial URL says “Page not found” or 404

Go to WordPress https://aihr.us/files/testimonials-widget/> Plugins to Deactivate and then Activate Testimonials Widget. Theflush_rewrite_rules function needs to run.

If that still doesn’t work, go to WordPress https://aihr.us/files/testimonials-widget/> Settings https://aihr.us/files/testimonials-widget/> Permalinks and click “Save Changes”.

24. Does this plug in use admin-ajax.php to refresh?

No, it doesn’t call admin-ajax.php at all.

25. Is there a way to reorder testimonials?

Look for ORDER BY under Advanced Options of the Testimonials Widget. In ORDER BY, put post_date. Then you use dates to put your testimonials into the order you want.

Alternately, use the orderby shortcode option.

26. How do I create a next link?

Either purchase Testimonials Widget Premium or seehttp://wordpress.org/support/topic/plugin-testimonials-widget-next-testimonial-not-paginationfor tips.

27. How do I hide the “No testimonials found” text?

In Widget options, check “Hide testimonials not found?” or in shortcode options usehide_not_found=true.

[testimonialswidget_list hide_not_found=true]

28. How do I export testimonials?

Use the WordPress Admin https://aihr.us/files/testimonials-widget/> Tools https://aihr.us/files/testimonials-widget/> Export option to do so. Besure to select ‘All content’ or ‘Testimonials’.

29. How do I import testimonials from WordPress export?

Go WordPress Admin https://aihr.us/files/testimonials-widget/> Tools https://aihr.us/files/testimonials-widget/> Import https://aihr.us/files/testimonials-widget/> WordPress, install and activate that WordPress importer. Then repeat the WordPress Admin https://aihr.us/files/testimonials-widget/> Tools https://aihr.us/files/testimonials-widget/> Import https://aihr.us/files/testimonials-widget/> WordPress sequence to actually import up your export.

30. What’s one way to programmatically query testimonials on a page without using shortcodes or widgets?

<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array( 'paged' =https://aihr.us/files/testimonials-widget/> $paged, 'posts_per_page' =https://aihr.us/files/testimonials-widget/> 10, 'orderby' =https://aihr.us/files/testimonials-widget/> DESC, 'post_type' =https://aihr.us/files/testimonials-widget/> Testimonials_Widget::pt );
// The Query
query_posts( $args );
// The Loop
while ( have_posts() ) : the_post();
// do your thing…
endwhile;
?https://aihr.us/files/testimonials-widget/>

Cheers to tcwebguru for this suggestion.

31. How do I change Testimonials Widget text labels?

  1. The default WPLANG is en_US.
    • Use en_US.mo and en_US.po as the filenames of your localization changes if you’re sticking with US English.
    • de_DE – German
    • en_UK – UK English
    • es_ES – Spanish
    • fr_FR – French
    • ja_JP.EUC-JP.mo – Japanese in EUC-JP encoding
    • zh-TW – Traditional Chinese
    • zh_CN – Simplified Chinese
  2. Create localized YOUR_WPLANG.mo and YOUR_WPLANG.po files fromlanguages/testimonials-widget.pot.
    • See Translation Tools of Translating WordPress for help.
    • Ensure that YOUR_WPLANG.mo and YOUR_WPLANG.po files contain the correctLanguage: tag like Language: es_ES and "Language: es_ESn"respectively.
    • Example: See screenshot 21. “Poedit Catalog properties”
  3. Create a directory named languages inside of wp-content.
  4. Put your YOUR_WPLANG.mo and YOUR_WPLANG.po files into your wp-content/languages directory.
  5. Set WPLANG in wp-config.php to your chosen language.
    • See Using Localizations of Translating WordPress for help.
    • Ex: <?php define('WPLANG', 'de_DE'); ?https://aihr.us/files/testimonials-widget/>

Sometimes the above doesn’t work, so…

  1. Create localized testimonials-widget-YOUR_WPLANG.mo and testimonials-widget-YOUR_WPLANG.po files from languages/testimonials-widget.pot.
  2. Put your localized testimonials-widget-YOUR_WPLANG.mo andtestimonials-widget-YOUR_WPLANG.po files into directory wp-content/plugins/testimonials-widget/languages/.
  3. Set WPLANG in wp-config.php to your chosen language.

When done translating, please send your translation for inclusion with the Testimonials Widget plugin release.

Check out Translating WordPress Plugins & Themes for fuller explanations.

32. How do I prevent testimonials in my footer from changing the page height?

Use the shortcode max-height or widget “Maximum Height” option to keep the testimonial widget height consistent.

33. How do I change the more content ellipsis?

In your theme’s functions.php file, add similar code as follows.

add_filter( 'testimonials_widget_content_more', function() { return ' Continue reading →'; } );

or

function my_content_more() {
    return ' Continue reading →';
}
add_filter( 'testimonials_widget_content_more', 'my_content_more' );

34. How is an active testimonial widget formatted with CSS?

<!-- testimonials outer wrapper begin --https://aihr.us/files/testimonials-widget/>
<!-- The NNN of testimonialswidget_testimonialsNNN represents the widget number for specific widget styling --https://aihr.us/files/testimonials-widget/>
<divhttps://aihr.us/files/testimonials-widget/>
    <!-- individual testimonial wrapper begin --https://aihr.us/files/testimonials-widget/>
    <divhttps://aihr.us/files/testimonials-widget/>
        <spanhttps://aihr.us/files/testimonials-widget/>
            <img width="150" height="150" src="http://example.com/example.jpg" alt="Example" title="Example"https://aihr.us/files/testimonials-widget/>
        </spanhttps://aihr.us/files/testimonials-widget/>
        <qhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>Testimonial AKA post content<spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
        </qhttps://aihr.us/files/testimonials-widget/>
        <citehttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>
                <a href="mailto:[email protected]"https://aihr.us/files/testimonials-widget/>Source AKA post title</ahttps://aihr.us/files/testimonials-widget/>
            </spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>Title</spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>Location</spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>
                <a href="http://example.com"https://aihr.us/files/testimonials-widget/>Company, LLC</ahttps://aihr.us/files/testimonials-widget/>
            </spanhttps://aihr.us/files/testimonials-widget/>
        </citehttps://aihr.us/files/testimonials-widget/>
        <divhttps://aihr.us/files/testimonials-widget/>Custom extra text</divhttps://aihr.us/files/testimonials-widget/>
        <divhttps://aihr.us/files/testimonials-widget/>Custom widget text</divhttps://aihr.us/files/testimonials-widget/>
    </divhttps://aihr.us/files/testimonials-widget/>
    <!-- individual testimonial wrapper end --https://aihr.us/files/testimonials-widget/>
</divhttps://aihr.us/files/testimonials-widget/>
<!-- testimonials outer wrapper end --https://aihr.us/files/testimonials-widget/>

Please view the testimonials-widget.css file for CSS customizations.

See FAQ 61 for NNN identification.

35. How is a testimonial list formatted with CSS?

<!-- testimonials outer wrapper begin --https://aihr.us/files/testimonials-widget/>
<divhttps://aihr.us/files/testimonials-widget/>
    <!-- individual testimonial wrapper begin --https://aihr.us/files/testimonials-widget/>
    <divhttps://aihr.us/files/testimonials-widget/>
        <spanhttps://aihr.us/files/testimonials-widget/>
            <img width="150" height="150" src="http://example.com/example.jpg" alt="Example" title="Example"https://aihr.us/files/testimonials-widget/>
        </spanhttps://aihr.us/files/testimonials-widget/>
        <qhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>Testimonial AKA post content<spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
        </qhttps://aihr.us/files/testimonials-widget/>
        <citehttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>
                <a href="mailto:[email protected]"https://aihr.us/files/testimonials-widget/>Source AKA post title</ahttps://aihr.us/files/testimonials-widget/>
            </spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>Title</spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>Location</spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/></spanhttps://aihr.us/files/testimonials-widget/>
            <spanhttps://aihr.us/files/testimonials-widget/>
                <a href="http://example.com"https://aihr.us/files/testimonials-widget/>Company, LLC</ahttps://aihr.us/files/testimonials-widget/>
            </spanhttps://aihr.us/files/testimonials-widget/>
        </citehttps://aihr.us/files/testimonials-widget/>
        <divhttps://aihr.us/files/testimonials-widget/>Custom extra text</divhttps://aihr.us/files/testimonials-widget/>
        <divhttps://aihr.us/files/testimonials-widget/>Custom widget text</divhttps://aihr.us/files/testimonials-widget/>
    </divhttps://aihr.us/files/testimonials-widget/>
    <!-- individual testimonial wrapper end --https://aihr.us/files/testimonials-widget/>
</divhttps://aihr.us/files/testimonials-widget/>
<!-- testimonials outer wrapper end --https://aihr.us/files/testimonials-widget/>

Please view the testimonials-widget.css file for CSS customizations.

See FAQ 61 for NNN identification.

36. How do I configure Next and Previous page indicators?

For previous page links, in your theme’s functions.php file, add similar code as follows.

add_filter( 'testimonials_widget_previous_posts_link_text', function() { return 'Previous'; } );

or

function my_testimonials_widget_previous_posts_link_text() {
    return 'Previous';
}
add_filter( 'testimonials_widget_previous_posts_link_text', 'my_testimonials_widget_previous_posts_link_text' );

For next page links, use testimonials_widget_next_posts_link instead oftestimonials_widget_previous_posts_link_text in above.

37. Why should I purchase the Testimonials Widget Premium?

Simply said, to demonstrate on-going support for the development of Testimonials Widget.

Further, you and other developers are very welcome to code your own version ofTestimonials Widget Premium plugin’s caching and ‘read more’ link capabilities without purchase. Since version 2.3.0, the free Testimonials Widget plugin provides several new filters or hooks which provides for easily incorporating the premium features.

It was a hard choice making the ‘Read more’ link feature a premium option. I knew that there were going to be people not happy with me for doing so. However, I feel that asking for you to purchase Testimonials Widget Premium is an acceptable request to help pay for the free, quick support and development like Testimonials Widget’s 17 high-level changesto go from version 2.2.9 to 2.3.0.

38. How do I use filter `testimonials_widget_defaults`?

To create a global or central Testimonials Widget configuration, in your theme’sfunctions.php file, add similar code as follows.

function my_testimonials_widget_defaults( $array ) {
    $array['category']            = 'testimony';
    $array['char_limit']      = 250;
    $array['paging']          = 'true';
    $array['refresh_interval']    = 10;
    return $array;
}
add_filter( 'testimonials_widget_defaults', 'my_testimonials_widget_defaults' );

39. How do I style the custom widget text?

In your theme’s styles.css file use the CSS class.testimonialswidget_bottom_text to style the custom widget text.

40. How do I get page numbers for pagination?

Install and activate WP-PageNavi to get page numbers for pagination of testimonials via the shortcode [testimonialswidget_list].

Additionally, you can use filter testimonials_widget_wp_pagenavi to configure WP-PageNavi specifically for Testimonial Widgets. Read WP-PageNavi’s core.phpwp_pagenavi function declaration for available options.

41. How do I make my widget height consistent and not overlapping?

In short, set min-height and max-height options to be the same.

Why? Because testimonial lengths differ and there might be an image or not, the normal CSS height property fails for our dynamic rotations.

42. How do I exclude testimonial categories from Category widget?

Add the following to your theme’s functions.php file:

function exclude_widget_categories( $args ) {
    // Make sure to replace the category IDs 8,10 with yours.
    $exclude                    = '8,10';
    $args['exclude']          = $exclude;
    return $args;
}
add_filter( 'widget_categories_args', 'exclude_widget_categories' );

Thank you katiewp for the answer.

43. How do I exclude testimonial categories from my sitemap?

Change the following in your theme’s functions.php or sitemap.php file:

Before:

<?php wp_list_categories('sort_column=name&optioncount=1&hierarchical=0&title_li='); ?https://aihr.us/files/testimonials-widget/>

After:

<?php wp_list_categories('sort_column=name&optioncount=1&hierarchical=0&title_li=&exclude=8,10'); ?https://aihr.us/files/testimonials-widget/>

Make sure to replace the category IDs 8,10 with yours.

Thank you katiewp for the answer.

44. Can I change how quickly the testimonials change?

Yes. Look for the “Rotation Speed” on the widget options panel or use therefresh_interval option in shortcode to adjust the number of seconds between testimonial rotations.

45. Why don’t I see all of my testimonial?

The widget option by default has a 500 character limit. To view more characters, increase the limit or set it to 0. See bottom of screenshot 3.

46. How do you order testimonials by given IDs?

To display the testimonials with IDs 538, 451, 442, 449, and 565 in that same order; you need to use the ids and orderby shortcode or widget options.

[testimonialswidget_list ids="538,451,442,449,565" orderby=none]

Thank you Ionrot for inspiring this FAQ and code feature.

47. How to make a testimonials listing in a widget than a rotating testimonial?

First, you’ll need to enable shortcodes in widget by addingadd_filter('widget_text', 'do_shortcode'); to the bottom of your themesfunctions.php file, before the closing ?https://aihr.us/files/testimonials-widget/>.

Then for the testimonials listing in a widget, use a Text widget with a shortcode like[testimonialswidget_list limit=5].

If you have formatting issues, you can check out Enabling shortcodes in widgets, quick WordPress tip. for further help.

Thank you davidnjacoby for recommending this FAQ.

48. How do I customize my testimonial list and widget output?

If you want to change the layout of the testimonials, then you can use thetestimonials_widget_testimonial_html filter. This filter follows theget_testimonials_html method which is how the testimonial HTML is normally generated. The testimonials_widget_testimonial_html filter works for widgets and lists.

add_filter( 'testimonials_widget_testimonial_html', 'my_testimonials_widget_testimonial_html', 10, 5 );
function my_testimonials_widget_testimonial_html( $content, $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) {
    // do stuff… see Testimonials_Widget::get_testimonial_html for default processing
    return $content;
}

49. How do I customize my testimonial single output?

See FAQ 48 for more details.

add_filter( 'testimonials_widget_testimonial_html_single', 'my_testimonials_widget_testimonial_html_single', 10, 3 );
function my_testimonials_widget_testimonial_html_single( $content, $testimonial, $atts ) {
    // do stuff… see Testimonials_Widget::get_testimonials_html for default processing
    return $content;
}

50. Example to set widget gradient background color

See FAQ 61 for NNN identification. Then write CSS like the following change the color behind the widget to a light gradient gold.

.testimonialswidget_testimonials3 {
    background-image: linear-gradient(to bottom right, #FFEF87 0%, #EFEFEF 100%);
}

A special thanks to inode86 for this suggestion.

51. How do I use filter `testimonials_widget_get_testimonial_html`?

Also see FAQ 48.

add_filter( 'testimonials_widget_get_testimonial_html', 'my_testimonials_widget_get_testimonial_html', 10, 13 );
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 ) {
    // do stuff… see Testimonials_Widget::get_testimonials_html for default processing
    if ( is_page( 437 ) ) {
        $source                 = '';
        if ( ! empty( $testimonial['testimonial_source'] ) )
            $source             = '<h3https://aihr.us/files/testimonials-widget/>' . $testimonial['testimonial_source'] . '</h3https://aihr.us/files/testimonials-widget/>';
        $html                   = $div_open
            . $source
            . $image
            . $quote
            // . $cite
            // . $extra
            // . $bottom_text
            . $div_close;
        return $html;
    } elseif ( false && $is_list ) {
        return '<lihttps://aihr.us/files/testimonials-widget/>' . $image . $testimonial['testimonial_title'] . '</lihttps://aihr.us/files/testimonials-widget/>';
    } else {
        return $html;
    }
}

Thank you to Georgia Gibbs Design for suggesting this capability.

52. How do I include testimonies in my archive view?

In your theme’s functions.php file, place code similar to the following for the configuration you need.

add_filter( 'pre_get_posts', 'pre_get_posts_allow_testimonials' );
function pre_get_posts_allow_testimonials( $query ) {
    if ( $query-https://aihr.us/files/testimonials-widget/>is_admin ) {
        return $query;
    } elseif ( ( $query-https://aihr.us/files/testimonials-widget/>is_main_query() || is_feed() )
        && ! is_page()
        && ( ( ! empty( $query-https://aihr.us/files/testimonials-widget/>query_vars['post_type'] ) && 'post' == $query-https://aihr.us/files/testimonials-widget/>query_vars['post_type'] )
            || is_archive() )
    ) {
        $query-https://aihr.us/files/testimonials-widget/>set( 'post_type', array( 'post', Testimonials_Widget::pt ) );
    }
    return $query;
}

53. How do I scroll my widget based testimonial content?

See FAQ 61 for NNN identification. Then in your theme’s styles.css file add CSS like the following.

.testimonialswidget_testimonialsNNN {
    overflow: auto;
}

54. Why is that there is an update like every other day?

I believe as Eric S. Raymond, author of “The Cathedral and the Bazaar” wrote

Release early. Release often. And listen to your customers.

Through 20 years of software development experience, I’ve found that Wikipedia’s definition and reasoning for frequent releases is true.

Release early, release often is a software development philosophy that emphasizes the importance of early and frequent releases in creating a tight feedback loop between developers and testers or users, contrary to a feature-based release strategy. Advocates argue that this allows the software development to progress faster, enables the user to help define what the software will become, better conforms to the users’ requirements for the software, and ultimately results in higher quality software.

References

Thank you gingalley for the explanation request.

55. How do I style about page testimonials while leaving other testimonials alone or vice versa?

To style a page’s testimonials or a particular testimonial widget instance, you need to style it with a page or testimonial wrapper class. Each page and testimonial has body or divclass tags to support such.

See FAQ 61 for NNN identification. Then in your theme’s styles.css file add CSS like the following.

.testimonialswidget_testimonialsNNN .testimonialswidget_testimonial {
    …
}

To style for a particular page, we use that page’s CSS class. As an example, Aihrus’ about page, has the body tag <bodyhttps://aihr.us/files/testimonials-widget/>. Therefore, I would do something like the following to style my testimonials.

.about-aihrus .testimonialswidget_testimonial {
    …
}

56. What’s the testimonials archive view URL?

It’s your URL with /testimonials/ appended. Like http://example.com/testimonials/.

See FAQ 66 to change.

57. What’s the testimonial single view URL?

It’s your URL with /testimonial/post-title-slug/ appended. Like http://example.com/testimonials/your-work-is-awesome/.

See FAQ 66 to change.

58. How do you specify testimonials per page or section?

Please view Make Specific testimonial appear in only one page.

59. Why does my rotating widget show all testimonials than only one at a time?

Please view Widget Displaying Whole List Of Testimonials.

60. How do I download older versions of Testimonials Widget?

You can browse code and download current and other versions of Testimonials Widget via its Developers page.

61. What’s NNN of “.testimonialswidget_testimonialsNNN”?

As the CSS class .testimonialswidget_testimonialsNNN is dynamically generated, you’re not going to find it in the Testimonials Widget CSS file. The reason being is that each Testimonials Widget instance is unique so that many can be used and styled on a page.

You may find your NNN value by looking at… * “CSS class” from your widget’s option panel - screenshot 3 * Your webpage’s HTML source code for the unique testimonial widget class identifier * Ex: <divhttps://aihr.us/files/testimonials-widget/> means you use CSS class.testimonialswidget_testimonials20

When writing testimonials CSS, don’t forget to change NNN to the number found above

62. Why do I get “No testimonials found” when using category and tags?

Because, there’s no testimonials having that category with those tags.

When using tags only, it’s possible to select from many testimonials unless you check the “Require all tags” option. Then only testimonials with all of those tags are selected.

63. How do I remove the cite –?

In your theme’s custom.css or styles.css file write the following CSS.

.testimonialswidget_testimonial cite::before { display: none; }

64. What plugins potentially conflict with Testimonials Widget?

  • JetPack shortcodes
  • FancyBox for WordPress

65. How do I disable the stylesheet?

In your theme’s functions.php file, add the following.

add_action( 'init', 'my_init' );
function my_init() {
    wp_dequeue_style( 'testimonials-widget' );
}

Thank you sazanetti for the suggestion.

66. How do I change the testimonials archive or single view URL?

Visit WordPress Admin https://aihr.us/files/testimonials-widget/> Testimonials https://aihr.us/files/testimonials-widget/> Settings https://aihr.us/files/testimonials-widget/> Post Type tab and adjust the “Archive Page URL” and “Testimonial Page URL” as desired. Don’t forget to update your Permalink Settings via WordPress Admin https://aihr.us/files/testimonials-widget/> Settings https://aihr.us/files/testimonials-widget/> Permalinks and clicking “Save Changes”.

67. My testimonials paging doesn’t work

Follow resolution in FAQ 23.

68. Where’s feature XYZ?

See this forum entry.

69. How do you fix “Fatal error: undefined method” on premium plugin?

Per the Upgrade Notice, the latest Testimonials Widget is required. Update that first, then Testimonials Widget Premium.

70. How do I customize my testimonials archive layout?

If you’re using the default testimonials URL, like http://example.com/testimonials/, then you can customize this view by copying your theme’s `archive.php` file to `testimonials-widget-archive.php` and editing it as you want.

Otherwise, look in the FAQ for entries on filters and HTML.

71. How do you enable shortcodes in widgets?

Add the following to your theme’s functions.php file.

add_filter( 'widget_text', 'do_shortcode' );

I’m still stuck, how can I get help?

Visit the support forum and ask your question.

Be Sociable, Share!