Back to Shopify Liquid
Trustpilot Comment
Shopify Liquid

Trustpilot Comment

A styling-heavy Trustpilot-themed review carousel with a horizontal scroll layout. It features custom-styled scrollbars, SVG star ratings, 'Verified' badges, and a green-themed aesthetic to mimic professional trust-building interfaces.

EasyReviewsTrustCROProduct PageSocial Proof
244 lines · 10.2 KB
Setup 5–10 minutes 5 min read 243 lines
Key features
  • Horizontal touch-scroll carousel functionality
  • Custom CSS-styled scrollbars for improved UX
  • Hard-coded Trustscore and review count indicators
Best use cases
  • Adding social proof testimonials to a landing page
  • Displaying customer feedback on the homepage or product pages
Compatibility
  • Most Shopify themes

The code

Shopify Liquid
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Trustpilot Reviews</title>
7 <style>
8 body.FgVdQeK8P7 {
9 font-family: Arial, sans-serif;
10 background-color: #f5fdf5;
11 margin: 0;
12 padding: 0;
13 }
14
15 h1.d3FsH6IqT4 {
16 margin-top: 30px;
17 font-size: 26px;
18 font-weight: bold;
19 color: #333;
20 text-align: center;
21 }
22
23 h1 .AaB2Y5Gp9f {
24 background: linear-gradient(to bottom, #28a745 0%, #d3f9d8 100%);
25 -webkit-background-clip: text;
26 color: transparent;
27 }
28
29 p.RwV2N5Lt0I {
30 margin-top: 5px;
31 font-size: 16px;
32 color: #555;
33 text-align: center;
34 }
35
36 .LaVtZ1Q0xK {
37 display: flex;
38 align-items: center;
39 justify-content: center;
40 font-family: Arial, sans-serif;
41 font-size: 14px;
42 color: #333;
43 margin-top: 10px;
44 }
45
46 .KsF9M8H2Ej {
47 display: flex;
48 align-items: center;
49 margin-right: 10px;
50 }
51
52 .KsF9M8H2Ej img {
53 max-width: 100px;
54 width: 100px;
55 height: auto;
56 }
57
58 .jX4N5P7Dr6 {
59 font-weight: normal;
60 }
61
62 .Yk4V8N6Vf1 {
63 font-weight: bold;
64 }
65
66 .zT8B3S1VgD {
67 font-weight: normal;
68 margin-left: 5px;
69 }
70
71 .F0rW6K8yEz {
72 display: flex;
73 flex-wrap: nowrap;
74 gap: 20px;
75 overflow-x: scroll;
76 padding: 20px;
77 margin: 20px auto;
78 width: 90%;
79 box-sizing: border-box;
80 }
81
82 .nQ0V3S1vD7 {
83 background-color: white;
84 border-radius: 8px;
85 padding: 20px;
86 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
87 text-align: left;
88 position: relative;
89 border-left: 4px solid #28a745;
90 width: 400px;
91 flex-shrink: 0;
92 }
93
94 .nQ0V3S1vD7 .Fb0W9T8TjZ {
95 font-weight: bold;
96 margin-bottom: 5px;
97 font-size: 14px;
98 color: #333;
99 }
100
101 .nQ0V3S1vD7 .rT9B3G2MdF {
102 font-size: 12px;
103 color: #777;
104 margin-bottom: 15px;
105 }
106
107 .nQ0V3S1vD7 .gP9Z3A2Kn7 {
108 font-size: 14px;
109 color: #555;
110 margin-bottom: 15px;
111 line-height: 1.6;
112 }
113
114 .nQ0V3S1vD7 .Vh3J2R4Nw1 {
115 font-size: 12px;
116 color: #28a745;
117 font-weight: bold;
118 }
119
120 .nQ0V3S1vD7 .Bz5W3F7Wz2 {
121 margin-top: 10px;
122 }
123
124 .Bz5W3F7Wz2 svg {
125 width: 16px;
126 height: 16px;
127 fill: #28a745;
128 }
129
130 .iX7Q3H6Fv4 {
131 font-size: 14px;
132 margin-top: 20px;
133 color: #555;
134 text-align: center;
135 }
136
137 .iX7Q3H6Fv4 span {
138 background-color: #28a745;
139 color: white;
140 padding: 2px 8px;
141 border-radius: 4px;
142 }
143
144 /* Scrollbar styling for horizontal scrolling */
145 .F0rW6K8yEz::-webkit-scrollbar {
146 height: 8px;
147 }
148
149 .F0rW6K8yEz::-webkit-scrollbar-thumb {
150 background-color: #28a745;
151 border-radius: 10px;
152 }
153
154 .F0rW6K8yEz::-webkit-scrollbar-track {
155 background-color: #f5fdf5;
156 }
157
158 /* Green gradient at the bottom with fading upwards */
159 .iX7Q3H6Fv4 {
160 background: linear-gradient(to top, #d3f9d8 0%, #e1f7e0 60%, #f5fdf5 100%);
161 padding: 20px;
162 text-align: center;
163 }
164 </style>
165</head>
166<body class="FgVdQeK8P7">
167
168 <h1 class="d3FsH6IqT4">Your <span class="AaB2Y5Gp9f">satisfaction</span> is our success</h1>
169 <p class="RwV2N5Lt0I">We value your feedback</p>
170
171 <div class="LaVtZ1Q0xK">
172 <div class="KsF9M8H2Ej">
173 <img src="https://i.imgur.com/EHjNmTM.png" alt="5 stars">
174 </div>
175 <div class="jX4N5P7Dr6">
176 Trustscore <span class="Yk4V8N6Vf1">4.9 | 14,500+</span> reviews
177 </div>
178 </div>
179
180 <div class="F0rW6K8yEz">
181 <div class="nQ0V3S1vD7">
182 <div class="Fb0W9T8TjZ">Julia M.</div>
183 <div class="rT9B3G2MdF">Just now</div>
184 <div class="gP9Z3A2Kn7">"Before, I struggled to balance work and workouts. With this reformer, I can quickly exercise at home after work. In just a few weeks, my core strength and posture improved dramatically."</div>
185 <div class="Vh3J2R4Nw1">✔ Verified Review</div>
186 <div class="Bz5W3F7Wz2">
187 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
188 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
189 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
190 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
191 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
192 </div>
193 </div>
194
195 <div class="nQ0V3S1vD7">
196 <div class="Fb0W9T8TjZ">Michaela R.</div>
197 <div class="rT9B3G2MdF">2 hours ago</div>
198 <div class="gP9Z3A2Kn7">"Thanks to the reformer, I can work out while my baby sleeps. In just 10 days, I lost 3 kg and feel stronger and more energetic thanks to regular training."</div>
199 <div class="Vh3J2R4Nw1">✔ Verified Review</div>
200 <div class="Bz5W3F7Wz2">
201 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
202 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
203 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
204 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
205 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
206 </div>
207 </div>
208
209 <div class="nQ0V3S1vD7">
210 <div class="Fb0W9T8TjZ">Anissa T.</div>
211 <div class="rT9B3G2MdF">1 week ago</div>
212 <div class="gP9Z3A2Kn7">"Before getting the mobile Pilates reformer in early 2024, my workouts were irregular. Now, I can train at home anytime and have seen improvements in strength, flexibility, and muscle tone within a few weeks."</div>
213 <div class="Vh3J2R4Nw1">✔ Verified Review</div>
214 <div class="Bz5W3F7Wz2">
215 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
216 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
217 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
218 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
219 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
220 </div>
221 </div>
222
223 <!-- New review cards -->
224 <div class="nQ0V3S1vD7">
225 <div class="Fb0W9T8TjZ">Sophia A.</div>
226 <div class="rT9B3G2MdF">3 hours ago</div>
227 <div class="gP9Z3A2Kn7">"Previously, I spent a fortune on Pilates classes, some costing up to 100 euros. The new FitCore reformer cost less than one class and gives me the freedom to plan my workouts from home."</div>
228 <div class="Vh3J2R4Nw1">✔ Verified Review</div>
229 <div class="Bz5W3F7Wz2">
230 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
231 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
232 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
233 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
234 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .587l3.668 7.431L24 9.748l-6 5.832 1.42 8.271L12 18.896l-7.42 4.955L6 15.58l-6-5.832 8.332-1.73z"/></svg>
235 </div>
236 </div>
237
238 </div>
239
240 <div class="iX7Q3H6Fv4">Based on <span>76,900</span> verified reviews</div>
241
242</body>
243</html>

How to install Trustpilot Comment on your Shopify theme

This snippet belongs in sections/main-product.liquid, directly under the Add to cart button, where it reinforces the purchase decision. Expect the whole job to take about 5–10 minutes.

  1. 1From your Shopify admin, open Online Store → Themes, click the button on your live theme and choose Duplicate. Always work on a copy so you can roll back instantly.
  2. 2On the duplicated theme, click … → Edit code to open the theme code editor.
  3. 3Open sections/main-product.liquid in the file tree. If your theme uses different file names, search for the template that renders the area where you want the block to show up.
  4. 4Click Copy code on this page, then paste the snippet directly under the Add to cart button, where it reinforces the purchase decision.
  5. 5The snippet ships with its own scoped <style> block, so you do not need to touch base.css or theme.css. If you prefer to keep CSS centralised, move the contents of the style tag into your theme stylesheet and delete the inline block.
  6. 6Click Save, then hit Preview and check the block on desktop, tablet and mobile widths.
  7. 7When you are happy with the result, publish the duplicated theme from Online Store → Themes → Actions → Publish.

How to customise it

Every value below lives inside the snippet, so you can adapt Trustpilot Comment to your brand without touching the rest of the theme.

  • Colours — the snippet uses #f5fdf5, #333, #28a745, #d3f9d8. Replace those values inside the style block with your brand palette, keeping at least a 4.5:1 contrast ratio between text and background so the block stays accessible.
  • Gradient — swap the linear-gradient(...) declaration for a flat background colour if you want a more minimal, theme-native look.
  • Typography — the block declares font-family: Arial, sans-serif. Delete that line to inherit your theme font instead, which usually looks better integrated.
  • Sizing — adjust the font-size values (26px, 16px, 14px) and the padding so the block carries the same visual weight as the elements around it.
  • Cornersborder-radius: 8px controls the roundness. Set it to 0 for a sharper editorial look, or increase it for a softer, app-like feel.
  • Images — replace the placeholder image URLs with your own assets. Upload them under Content → Files in Shopify admin and use the generated CDN URL, or reference a theme asset with {{ 'my-image.png' | asset_url }}.
  • Copy — rewrite the hard-coded text (for example “Trustpilot Reviews”) in your own brand voice, and translate it if you sell in more than one language.

Common mistakes to avoid

These are the issues merchants run into most often when installing a snippet like this one.

  • Editing the live theme directly. Duplicate it first — a single unbalanced Liquid tag can take a storefront down mid-campaign.
  • Pasting the code into the wrong file. Dropped into layout/theme.liquid instead of sections/main-product.liquid, this block will render on every page of the store, including ones where it makes no sense.
  • Renaming the CSS classes in the markup but not in the style block, or vice versa. The class names have to match exactly or the styling silently disappears.
  • Leaving the demo images in place. They are hosted on third-party domains, can disappear at any time and slow the page down. Re-upload them to Shopify Files before going live.
  • Publishing without testing on a real phone. Most Shopify traffic is mobile, and layout problems almost always surface there first.

Performance notes

What this block costs you in load time, and how to keep that cost at zero.

  • The CSS is inline and scoped to this block, so it adds no extra network request. At a few kilobytes it has no measurable effect on your Lighthouse score.
  • Add loading="lazy" plus explicit width and height attributes to every image in the snippet. That prevents Cumulative Layout Shift, which is a Core Web Vitals ranking factor.
  • Third-party image URLs bypass the Shopify CDN and add extra DNS lookups. Self-hosting those assets usually saves 100–300ms on first paint.
  • Run PageSpeed Insights before and after you add the block so you have a concrete number rather than a guess.

SEO & accessibility

How to add this block without damaging your on-page structure or your rich results.

  • Nothing in this snippet should replace your page <h1>. Keep product and page headings intact and use <h2> or <h3> for the block's own heading so the document outline stays clean.
  • Write a descriptive alt attribute for every image. Empty or generic alt text is one of the most common accessibility and SEO issues on Shopify stores.
  • If the block shows review or rating content, keep it consistent with the structured data your review app already outputs. Duplicating or contradicting rating markup can cost you the rich result entirely.
  • The block does not create a new URL, so there is no canonical or indexing change to make. It improves on-page engagement signals rather than crawlability.
Frequently asked questions

Trustpilot Comment — questions merchants ask

Will this snippet work with my theme?

It is built with standard Liquid, HTML and CSS, so it works with Dawn and virtually every Online Store 2.0 theme, as well as most vintage themes. The only thing that changes between themes is the file you paste it into — if yours has no sections/main-product.liquid, look for the equivalent template that renders the same area.

Do I need an app to use it?

No. This is theme code you own outright: no monthly fee, no third-party script tag, and no app that can break your storefront the next time it updates.

How long does it take to add “Trustpilot Comment” to a store?

Most merchants have it live in under fifteen minutes — duplicate the theme, paste the code, adjust the colours and copy, preview on mobile, publish.

The styling looks broken after pasting. How do I fix it?

Confirm you copied the whole snippet including the closing style tag, then check whether one of your theme's own CSS rules is overriding it. If a theme rule wins, increase the specificity of the snippet's selector rather than scattering !important through the file.

Will it slow my store down?

Not meaningfully. It is inline markup with scoped CSS and at most a few lines of vanilla JavaScript — no external libraries, no extra HTTP request. Optimising your product images will always have a far bigger impact on load time.

Can I use it on a client store or a commercial project?

Yes. Every snippet in the MCO Hub library is free to copy, modify and ship on any store, including client work. Attribution is appreciated but not required.

Related snippets

Keep exploring