WordPress · 5 min read
How to add Google reviews to WordPress
WordPress has plenty of review plugins. It also has a Custom HTML block, which does the same job with nothing to install, update or debug after the next core release. This guide covers Gutenberg, the Classic Editor, widget areas, block themes and every major page builder.
Last reviewed by the Reviews Widget product team.
Plugin or no plugin?
A plugin adds PHP that runs on every request, another update to track and another candidate when something breaks. A script tag in a Custom HTML block adds none of that — the fetching and caching happen off your host, and the only thing on your site is one line of HTML.
| Review plugin | Script embed | |
|---|---|---|
| Install | Upload, activate, configure | Paste one line |
| Runs on your host | Yes — PHP and database queries | No |
| Breaks on core or PHP updates | Possible | No |
| Design changes | Plugin settings screen | Dashboard, no site edit needed |
| Portable to another CMS | No | Yes — same tag anywhere |
Step-by-step walkthrough
Skip the reading — build your widget now
Free plan, no credit card. Your reviews are embedded before you finish this guide.
Create the widget, attach your Google Business Profile by searching your business name, style it to your theme, copy the script tag, paste it into a Custom HTML block, then update and check the published page with your cache cleared.
- 1
Create your free Reviews Widget
Sign up, search your business name to attach your Google Business Profile, and let the first fetch pull in your reviews. No API key and no Google Cloud project.
- 2
Style the widget for your theme
Pick grid, masonry, list, carousel, a scrolling marquee, review popups or a floating star badge, then match your theme's colours, corner radius and font scale in the live preview at desktop, tablet and mobile widths.
- 3
Copy the one-line embed snippet
Open the Embed tab and copy the script tag. It is under 200 bytes and loads asynchronously, so it stays out of the critical rendering path.
- 4
Open the WordPress editor
In wp-admin, open the page, post or template where the reviews belong — the homepage, a testimonials page, a service page or a widget area.
- 5
Paste it into a Custom HTML block
In Gutenberg, add a Custom HTML block and paste the tag. In the Classic Editor switch to the Text tab first, or WordPress will strip the script. For sidebars and footers, use a Custom HTML widget under Appearance then Widgets.
- 6
Update and check the live page
Save, then view the published page rather than the editor preview. Purge any caching plugin, confirm the reviews render, then run the URL through Google's Rich Results Test to see the JSON-LD parse.
Where to paste it in WordPress
| Editing surface | Exact location | Watch out for |
|---|---|---|
| Gutenberg block editor | Add block, search 'Custom HTML' | Preview tab may not run the script — publish first |
| Classic Editor | Text tab, not Visual | Visual tab strips script tags on save |
| Sidebar or footer | Appearance → Widgets → Custom HTML | Narrow columns suit list or badge layouts |
| Block theme templates | Site Editor → template part → Custom HTML block | Appears sitewide, so place it deliberately |
| Theme files | Directly in a template PHP file | Use a child theme or it is lost on update |
Page builders and block themes
| Builder | Module to use | Tier required |
|---|---|---|
| Elementor | HTML widget | Free |
| Divi | Code module | Included |
| WPBakery | Raw HTML element | Included |
| Beaver Builder | HTML module | Included |
| Bricks | Code element | Included |
| Full-site editing themes | Custom HTML block in a template part | Core |
Elementor has its own walkthrough with the exact panel steps: embed Google reviews in Elementor.
Performance and caching
Because the script is asynchronous and served from our infrastructure, WordPress caching plugins cache the page around it rather than the reviews inside it. That means a cached page still renders current reviews — but it also means you must purge the cache after changing where the snippet sits.
If you run an optimisation plugin, exclude the snippet from any "delay JavaScript until interaction" or aggressive script-combining setting. Those features postpone third-party scripts until a user interacts, which leaves an empty space where the reviews should be for anyone who scrolls without clicking.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Snippet vanishes after saving | Pasted into Visual tab or a paragraph block | Use the Text tab or a Custom HTML block |
| Reviews show for admins only | Page cache serving an older copy to visitors | Purge the caching plugin and CDN |
| Empty gap where reviews should be | 'Delay JavaScript' optimisation setting | Exclude the snippet from delay and combine rules |
| Works on one page, not another | Snippet only pasted on one page | Add the block to each page, or a template part |
| Widget too wide or clipped | Theme container has a fixed height or overflow hidden | Let the wrapper size to its content |
| Nothing renders in the block preview | Editor sandboxes scripts | View the published page instead |
Sources & further reading
- WordPress — Custom HTML block — Official documentation for the block that accepts the snippet
- WordPress — Widgets screen — Adding a Custom HTML widget to a sidebar or footer
- Google Search Central — review snippet guidelines — Self-serving review rules
- web.dev — Largest Contentful Paint — Why an async script stays out of the critical path