To output a count of testimonials for your visitors or display your aggregate rating for search engines, use the following guide.
- To display a numerical Count of your Testimonials, use the following shortcode where you want the Number to appear:
[testimonials_count]
- To display an aggregate rating of your testimonials (for Google’s crawler), use the
show_aggregate_rating
attribute:
// Output a count of your testimonials along with their aggregate rating [testimonials_count show_aggregate_rating='1'] // Output a count of your testimonials along with their aggregate rating, shown as stars and text [testimonials_count show_aggregate_rating='1' show_aggregate_rating_stars='1'] // Output a count of your testimonials along with their aggregate rating, shown as just stars [testimonials_count show_aggregate_rating='1' show_aggregate_rating_stars='1' show_aggregate_rating_text='0']
- To display a numerical Count of your Testimonials from a specific category and/or with a specific status, use the
status
andcategory
attributes:
// display a count of your testimonials in a specific category on the front-end // (Be sure to replace the_category_slug with your own Testimonial Category's slug) [testimonials_count status='any' category='the_category_slug'] // display a count of your Approved testimonials in a specific category on the front-end // (Be sure to replace the_category_slug with your own Testimonial Category's slug) [testimonials_count status='publish' category='the_category_slug'] // display a count of your Pending testimonials in a specific category on the front-end // (Be sure to replace the_category_slug with your own Testimonial Category's slug) [testimonials_count status='pending' category='the_category_slug'] // display a count of your Trashed testimonials in a specific category on the front-end // (Be sure to replace the_category_slug with your own Testimonial Category's slug) [testimonials_count status='trash' category='the_category_slug']
Supported parameters for
status
arepublish
,pending
,draft
,future
,private
,trash
,any
. - Note: this Shortcode only displays the numerical count — you will need to add any words yourself. For example, “There are currently [testimonials_count] Testimonials on your website!”