Want to display quotations or testimonials by your customers/clients in a grid of speech bubbles like this?
In this tutorial I show how testimonial CPT entries via Testimonials by WooThemes plugin can be displayed in a grid of 3 entries on the archive page. For each entry, testimonial excerpt, name, byline and photo will be set to appear.
Step 1
Add the following in child theme's functions.php:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register new image size for testifier photos | |
add_image_size( 'testifier-thumbnail', 128, 128, true ); |
Step 2
Install and activate Testimonials by WooThemes.
Add your clients' testimonials.
Step 3
Create a file named archive-testimonial.php having the following code:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Does the “Testimonials by WooThemes” output schema formatting for testimonials?
We aren’t using the plugin’s function call or shortcode for the output. We are using Genesis standard archive page entry markup. Here’s a screenshot of the output: http://d.pr/i/110bI
Hello Sridhar,
I have used your tutorial and I have juste a little question: how do you set the number of testimonials per page?
Currently, this archive displays 5 testimonials and I wish to displays 6.
I tried to use the setting of post/page in the blog settings of genesis, but it does not work.
Thanks for your help.
Try adding this in functions.php: http://pastebin.com/raw/ApzdkbrE
Hello Sridhar,
Thanks for this but it does not work for me.
Hi Sridhar,
I was wondering if you know a way to have this have the Testimonials appear in a random order each time the page is loaded, I found the following code which says it will work – https://pastebin.com/ZStFxE5E, but I don’t see the ‘orderby => ‘rand’ as a valid option in the plugin doc.
Thanks!
Hi Ken,
Replace that code with this: