
How to Create a Testimonials Section in WordPress?
A testimonials section turns other people's words into your best sales pitch, and it's one of the highest-return additions you can make to a WordPress site. Visitors trust a quote from a real customer far more than the same claim written in your own marketing copy, which is why testimonials consistently show up near the top of conversion-focused pages: pricing, checkout, and the homepage above the fold.
WordPress has no built-in concept of a "testimonial," so you're choosing between a dedicated testimonials plugin (fast to set up, comes with layout options like sliders and grids) or a small custom post type plus shortcode (lighter weight, and you control the markup completely). This guide covers both, including a full, working code example for the custom route.
What Makes a Good Testimonial Display
Before building anything, it's worth being deliberate about what actually earns trust:
- A real name and, ideally, a photo. Anonymous quotes read as far less credible than "Sarah T., Marketing Director."
- Specificity over generic praise. "This saved us six hours a week" is more persuasive than "Great service!"
- A star rating, if relevant to your business, since visitors scan for it even before reading the text.
- Enough testimonials that it doesn't look staged. Two or three is usually the practical minimum; a rotating slider or paginated grid works better once you have more than five or six.
Option 1: Use a Testimonials Plugin
Strong Testimonials
Strong Testimonials is the most widely used free testimonials plugin for WordPress, and it covers the core need well:
- A dedicated Testimonials submission and management screen, separate from posts and pages.
- A front-end submission form, so customers can submit their own testimonial for your approval before it goes live.
- Multiple built-in display layouts (grid, list, slider) via shortcode, each with template and styling options.
- Star rating fields, photo uploads, and custom fields for things like a customer's company name.
Setup:
- Install and activate Strong Testimonials from Plugins > Add New.
- Go to the new Testimonials menu and click Add New to enter your first testimonial, or use Testimonials > Import if you already have quotes collected elsewhere.
- Under Testimonials > Settings, choose your default display template (grid, list, or slider).
- Copy the shortcode shown at the top of the Testimonials list screen, typically
[strong_testimonials], and paste it onto any page.
The free version covers the essentials well; the paid Testimonials Pro add-ons unlock more advanced filtering, category-based display, and additional slider styles. Because a testimonials slider is really just a specialized carousel, the setup mirrors what's covered in adding a slider to your WordPress website, just pre-built around testimonial content specifically.
If you'd rather see video testimonials rather than just text quotes, pairing a plugin like this with adding video to your WordPress website is a natural combination: embed a short customer video clip alongside or instead of a written quote.
Option 2: Build a Custom Testimonials Section Yourself
If you want full control over the markup and don't need front-end submission forms, a custom post type plus a shortcode is a clean, dependency-free solution.
Step 1: Register a "Testimonial" Post Type
add_action( 'init', function () {
register_post_type( 'tw_testimonial', [
'label' => 'Testimonials',
'public' => false,
'show_ui' => true,
'show_in_rest' => true,
'supports' => [ 'title', 'editor', 'thumbnail' ],
'menu_icon' => 'dashicons-format-quote',
] );
} );
Here, post_title holds the customer's name, post_content (the normal editor) holds the testimonial text itself, and the featured image holds their photo. public is false since testimonials don't need their own individual front-end URLs; they only ever appear embedded via the shortcode below.
Step 2: Add a Rating Meta Box
add_action( 'add_meta_boxes', function () {
add_meta_box( 'tw_testimonial_rating', 'Rating', 'tw_render_rating_box', 'tw_testimonial', 'side' );
} );
function tw_render_rating_box( $post ) {
$rating = get_post_meta( $post->ID, 'tw_rating', true ) ?: 5;
wp_nonce_field( 'tw_save_rating', 'tw_rating_nonce' );
?>
<select name="tw_rating" style="width:100%;">
<?php for ( $i = 5; $i >= 1; $i-- ) : ?>
<option value="<?php echo esc_attr( $i ); ?>" <?php selected( $rating, $i ); ?>>
<?php echo esc_html( $i . ' star' . ( $i > 1 ? 's' : '' ) ); ?>
</option>
<?php endfor; ?>
</select>
<?php
}
add_action( 'save_post_tw_testimonial', function ( $post_id ) {
if ( ! isset( $_POST['tw_rating_nonce'] ) || ! wp_verify_nonce( $_POST['tw_rating_nonce'], 'tw_save_rating' ) ) {
return;
}
if ( isset( $_POST['tw_rating'] ) ) {
update_post_meta( $post_id, 'tw_rating', absint( $_POST['tw_rating'] ) );
}
} );
Step 3: Build the Testimonials Shortcode
add_shortcode( 'testimonials', function ( $atts ) {
$atts = shortcode_atts( [
'count' => 6,
], $atts, 'testimonials' );
$testimonials = new WP_Query( [
'post_type' => 'tw_testimonial',
'posts_per_page' => (int) $atts['count'],
'orderby' => 'date',
'order' => 'DESC',
] );
if ( ! $testimonials->have_posts() ) {
return '';
}
ob_start();
?>
<div class="tw-testimonials-grid">
<?php while ( $testimonials->have_posts() ) : $testimonials->the_post();
$rating = (int) get_post_meta( get_the_ID(), 'tw_rating', true ) ?: 5;
?>
<div class="tw-testimonial-card">
<div class="tw-testimonial-stars" aria-label="<?php echo esc_attr( $rating . ' out of 5 stars' ); ?>">
<?php echo esc_html( str_repeat( '★', $rating ) . str_repeat( '☆', 5 - $rating ) ); ?>
</div>
<blockquote class="tw-testimonial-quote"><?php echo wp_kses_post( get_the_content() ); ?></blockquote>
<div class="tw-testimonial-author">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'thumbnail', [ 'class' => 'tw-testimonial-avatar' ] ); ?>
<?php endif; ?>
<span><?php the_title(); ?></span>
</div>
</div>
<?php endwhile; ?>
</div>
<?php
wp_reset_postdata();
return ob_get_clean();
} );
Drop [testimonials count="9"] onto any page and it renders a responsive grid of star-rated testimonial cards. This uses the exact same register_post_type() plus add_shortcode() pattern covered in depth in how to create a WordPress shortcode: a custom post type stores the structured data, and the shortcode is just a WP_Query loop that formats it for display.
Step 4: Style the Grid
.tw-testimonials-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1.5rem;
}
.tw-testimonial-card {
border: 1px solid #e5e5e5;
border-radius: 8px;
padding: 1.5rem;
}
.tw-testimonial-stars {
color: #f5a623;
font-size: 1.1rem;
}
.tw-testimonial-quote {
margin: 0.75rem 0;
font-style: italic;
}
.tw-testimonial-author {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
}
.tw-testimonial-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
auto-fit with minmax(260px, 1fr) is what makes this grid genuinely responsive without a single media query: the browser fits as many 260px-minimum columns as will comfortably wrap, collapsing to a single column automatically on narrow screens.
Turning the Grid Into a Slider
If you have more than six or seven testimonials, a rotating slider often reads better than a long scrolling grid. You can wrap the same card markup from Step 3 in a lightweight slider, following the exact HTML/CSS/JS pattern from adding a slider to your WordPress website: swap the static grid container for a horizontally-scrolling flex container, and advance it on an interval or with next/previous buttons.
Choosing Between the Two Approaches
- Use Strong Testimonials if you want a front-end submission form so customers can submit their own testimonials, or if you want a slider layout without building one yourself.
- Build it yourself if you're comfortable entering testimonials manually through the dashboard and want full control over the markup and styling with no plugin overhead.
- Combine both by keeping the custom post type for structured data, but adding a simple front-end form (following the same
admin-post.phppattern used for a booking system) if you later want customer-submitted testimonials without installing a full plugin.
Frequently Asked Questions (FAQ) About WordPress Testimonials
The highest-impact placements are directly above a call-to-action (right before a signup button or pricing table) and on the homepage. A dedicated testimonials page rarely gets much traffic on its own, since visitors need to see social proof at the exact moment they're deciding whether to act.
Three to five well-written, specific testimonials generally read as more credible than a dozen generic ones. Quality and specificity ("cut our onboarding time in half") matter more than raw quantity; a wall of vague five-star quotes can actually look less authentic.
Strong Testimonials includes a built-in front-end submission form with a moderation queue, so nothing goes live until you approve it. A custom build would need its own submission form and a draft-by-default post status, similar to the pattern used for a custom booking form.
A real photo (or at minimum a name and title, like "Marcus R., Small Business Owner") meaningfully increases trust compared to an anonymous quote. Stock photos or clearly fake avatars can backfire, so if you don't have a real photo, a name and role alone is safer than a generic stock headshot.
Yes. You can either use a testimonials plugin's video field if it supports one, or embed a short customer video clip directly above or below a written quote using the approach covered in adding video to your WordPress website, which works for both self-hosted and YouTube-embedded clips.
Adding Review or AggregateRating structured data can make star ratings eligible to appear in search results, but Google's guidelines restrict this markup to genuine, verifiable reviews of your own product or service, not third-party endorsements used as general social proof. Check current structured data guidelines before adding review schema.
Trimming a testimonial for length is common practice, but changing its meaning or adding words the customer didn't say is both an ethical and, in some jurisdictions, a legal problem (deceptive advertising). When in doubt, get the customer's sign-off on the exact wording you plan to publish.
Conclusion
Testimonials are one of the few site elements where the content itself, not the design, does most of the persuading, which is why it's worth spending more time collecting good, specific quotes than agonizing over the layout that displays them. Strong Testimonials gets you a submission form, moderation, and slider layouts with almost no setup effort, which is hard to beat if you expect to collect testimonials directly from customers over time.
The custom post type and shortcode approach above is just as valid if you're comfortable entering testimonials yourself and want a section that matches your site's design exactly, without carrying a plugin's settings screens and database tables for a feature this simple.
Either way, place the finished section where it actually influences a decision, near your pricing, your signup form, or your homepage's main call-to-action, rather than tucked away on a page few visitors ever find.


