← Back to Blog

How to Embed Testimonials on Any Website (HTML, WordPress, Shopify)

Jan 30, 20267 min read

You've collected amazing testimonials. Now you need to show them off. Here's exactly how to embed testimonials on your website — whether you're using custom HTML, WordPress, Shopify, or any other platform.

We'll cover code snippets, widget options, and platform-specific guides so you can go from zero to social proof in under 10 minutes.

Method 1: Pure HTML/CSS (Custom Websites)

If you're building a custom site or have access to your HTML, this is the most flexible approach. Here's a clean, responsive testimonial card:

<!-- Testimonial Card -->
<div class="testimonial-card">
  <div class="stars">⭐⭐⭐⭐⭐</div>
  <p class="quote">
    "This product saved me 10 hours a week. 
    Absolute game-changer for my workflow."
  </p>
  <div class="author">
    <img src="/avatar.jpg" alt="Sarah Chen" />
    <div>
      <strong>Sarah Chen</strong>
      <span>Marketing Director, TechCorp</span>
    </div>
  </div>
</div>

<style>
  .testimonial-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
  }
  .stars { 
    color: #fbbf24; 
    margin-bottom: 12px; 
  }
  .quote {
    font-size: 16px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 16px;
  }
  .author {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  .author strong {
    display: block;
    color: white;
  }
  .author span {
    font-size: 14px;
    color: #94a3b8;
  }
</style>

Method 2: JavaScript Carousel (Auto-Rotate)

Want testimonials to rotate automatically? Here's a lightweight vanilla JS solution:

<div id="testimonial-slider"></div>

<script>
const testimonials = [
  {
    text: "Best decision we made this year.",
    author: "John Doe",
    role: "CEO, StartupCo"
  },
  {
    text: "Incredible support and product quality.",
    author: "Jane Smith", 
    role: "Founder, DesignStudio"
  }
];

let current = 0;
const slider = document.getElementById('testimonial-slider');

function showTestimonial() {
  const t = testimonials[current];
  slider.innerHTML = `
    <div class="testimonial-slide">
      <p>"${t.text}"</p>
      <strong>${t.author}</strong>, ${t.role}
    </div>
  `;
  current = (current + 1) % testimonials.length;
}

showTestimonial();
setInterval(showTestimonial, 5000); // Rotate every 5s
</script>

Method 3: WordPress (3 Ways)

WordPress users have multiple options:

Option A: Custom HTML Block

  1. Edit your page in Gutenberg
  2. Add a "Custom HTML" block
  3. Paste the HTML snippet from Method 1
  4. Add the CSS to Appearance → Customize → Additional CSS

Option B: Popular Plugins

  • Strong Testimonials — Free, 60k+ active installs, form builder included
  • Testimonial Slider — Lightweight carousel with shortcodes
  • Elementor — If you use Elementor, it has a built-in testimonial widget

Option C: Embed Widget (TestiGather Method)

  1. Generate your widget code from TestiGather
  2. Go to Appearance → Widgets or use Custom HTML block
  3. Paste the embed code
  4. Publish — done!

Method 4: Shopify

Shopify makes embedding super simple:

Using Shopify's Theme Editor:

  1. Go to Online Store → Themes → Customize
  2. Click "Add section" → Custom Liquid
  3. Paste your HTML code or widget embed
  4. Save and publish

Popular Shopify apps: Loox, Stamped.io, Judge.me (all include review widgets)

Method 5: Wix

  • Click "Add" → Embed → Custom Embeds → Embed a Widget
  • Paste your widget code or HTML
  • Adjust size and position

Wix also has a native testimonials element in the editor: Add → List & Grids → Testimonials.

Method 6: Squarespace

  1. Edit your page
  2. Add a Code Block
  3. Paste your HTML or widget embed
  4. Switch to Display mode (not Edit mode) to see it live

Method 7: Webflow

Webflow gives you full design control:

  • Drag an Embed element onto your page
  • Paste your HTML/CSS/JS code
  • Or use Webflow's CMS to create a testimonials collection and design cards visually

💡 Pro tip

Use TestiGather's widget generator to create a no-code embed that works on any platform. Just copy/paste one line of code.

Widget Options: DIY vs. Tools

You have two paths:

DIY Approach

  • Pros: Free, full control, no external dependencies
  • Cons: Manual updates, no auto-sync, requires coding

Testimonial Widget Tools

  • Pros: Auto-updates, design templates, analytics, moderation
  • Cons: Monthly fees ($20-$100+)

Popular tools: Testimonial.to ($15/mo), EmbedSocial ($29/mo), TestiGather ($49 lifetime).

Design Best Practices

Make your testimonials convert:

  • Include photos — Testimonials with faces get 32% more trust
  • Show star ratings — Visual credibility booster
  • Keep it scannable — 2-3 sentences max per testimonial
  • Add attribution — Full name + role/company (never anonymous)
  • Use quotes — Makes it clear it's a direct quote, not marketing copy

Layout Ideas

1. Grid Layout (Homepage)

3 cards side-by-side on desktop, stack on mobile. Great for "What Our Customers Say" sections.

2. Slider/Carousel (Landing Pages)

Auto-rotating testimonials. Keeps content fresh without taking up too much space.

3. Wall of Love (Dedicated Page)

Masonry grid showing 20+ testimonials. See examples here.

4. Sidebar Widget (Blog)

Single testimonial that rotates. Adds social proof without disrupting content flow.

Advanced: Dynamic Loading from API

If you want testimonials to update automatically without touching code, fetch them from an API:

<div id="testimonials"></div>

<script>
fetch('https://api.testigather.com/v1/testimonials/YOUR_KEY')
  .then(res => res.json())
  .then(data => {
    const container = document.getElementById('testimonials');
    data.forEach(t => {
      container.innerHTML += `
        <div class="testimonial">
          <p>"${t.text}"</p>
          <strong>${t.author}</strong>
        </div>
      `;
    });
  });
</script>

Mobile Optimization

60% of visitors are on mobile. Make sure your testimonials:

  • Stack vertically on small screens
  • Use readable font sizes (16px minimum)
  • Have touch-friendly carousel controls (if using a slider)
  • Load fast (optimize images, lazy load if needed)

Schema Markup (SEO Bonus)

Add structured data to help Google show star ratings in search results:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Review",
  "itemReviewed": {
    "@type": "Product",
    "name": "Your Product"
  },
  "author": {
    "@type": "Person",
    "name": "Sarah Chen"
  },
  "reviewRating": {
    "@type": "Rating",
    "ratingValue": "5",
    "bestRating": "5"
  },
  "reviewBody": "This product saved me 10 hours a week."
}
</script>

Troubleshooting Common Issues

Widget not showing up?

  • Check browser console for errors (F12)
  • Verify the embed code is in the <body>, not <head>
  • Make sure JavaScript is enabled

Styling looks broken?

  • Your theme CSS might be overriding. Add !important to key styles
  • Use your browser's inspect tool to find conflicting styles

Widget slow to load?

  • Use lazy loading: add loading="lazy" to images
  • Minimize external dependencies (load from your domain if possible)

Where to Place Testimonials

Strategic placement matters:

  • Homepage hero: 1 rotating testimonial near CTA
  • Mid-page: Grid of 3-6 after features section
  • Pricing page: Address objections with relevant testimonials
  • Checkout: Trust badge + 1-2 testimonials to reduce cart abandonment
  • Dedicated page: Full testimonial wall for browsers

Your Next Steps

  1. Choose your platform method above
  2. Copy the appropriate code snippet
  3. Customize the design to match your brand
  4. Test on mobile and desktop
  5. Monitor conversions and iterate

Need more examples? Check out 20+ real testimonial wall designs.

Related Articles

Skip the Code — Use a Widget

TestiGather generates a beautiful, responsive widget with one line of code. Auto-syncs, mobile-optimized, works everywhere.