Appearance, Shortcodes

Testimonials Shortcode

You can use shortcodes to embed testimonials on posts and pages.

Embedding Testimonials

To embed testimonials on posts and pages, first activate the Testimonial custom content type on your site and add some testimonials.

Next, add the [testimonials] shortcode to a post or page. The shortcode will display testimonials in different ways, depending on how you use the optional attributes to customize the testimonials layout.

testimonials-shortcode

Attributes

  • display_content: display testimonial content. (full/true/false)
  • image: display the featured image. (true/false)  Defaults to true.
  • columns: number of columns in shortcode. Defaults to 1. (number, 1-6)
  • showposts: number of testimonials to display. Defaults to all. (number)
  • order: display testimonials in ascending or descending chronological order. Defaults to ASC for sorting in ascending order, but you can reverse the order by using DESC to display testimonials in descending order instead. (ASC/DESC)
  • orderby: sort testimonials by different criteria, including author name, testimonial title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)

↑ Table of Contents ↑

Example

[testimonials columns=2 showposts=10 orderby=title]
The example will display up to ten testimonials in two columns, in ascending alphabetical order by testimonial title.

testimonials-shortcode2

Not quite what you're looking for?

Get Help