How to display Google reviews on your WordPress website

Without customer feedback and ratings, how can you know if a business is any good? Showing potential customers what other people think about your company goes a long way toward making them feel more confident about choosing your business. The Google Places API allows you to do just that by pulling in reviews from Google into your website.

This is a developer’s guide to the Google Places API. The guide is intended for developers who want to incorporate Google reviews into their WordPress (or with some adaptation, any PHP) website.

Why show customer reviews?

Showing that you care about what customers think is a great way to gain trust. When you add a reviews section to your website, you’re demonstrating your credibility as a legitimate business.

Unless you’re a household name, your potential customers may not know much about your business. Showing reviews can help give the confidence needed to make a purchasing decision.

They’re a great way to show that you are actively listening to what your customers have to say. It also helps you identify areas where you can improve your business.

It’s not just about making people feel good about doing business with you. It’s also about building relationships and creating loyal customers.

Google Places API

The Google Places API is a free service that helps developers build applications with local business information. The API is how developers can access Google’s database and get business information, including location, hours, phone number and most importantly for us—reviews.

Limitations of the Google Places API

The Google Places API is a great resource for retrieving information about places. However, it does have some limitations which may make it unsuitable for your needs. The following are some of the limitations.

Maximum of five

The Google Places API will only return five reviews for a given place ID. However, for many, five is sufficient alongside a link off to Google’s listing of all the business’ reviews.

Random selection

The Google Places API doesn’t return a specific set of reviews (for example, the latest five), but rather a random selection. You’ll get a different set of reviews on each request. While not necessarily a bad thing, it’s made worse by the next limitation.

The good and the bad

The Google Places API does not exclude bad reviews, nor is there a parameter to specify a minimum star rating. While openness and transparency are virtues, if you’re working with your own reviews, you will likely want to filter out the overly negative ones. Filtering on 4 or 5 star reviews means that less than five reviews can be displayed, since the API only returns a total of five reviews.

Prohibitive caching policy

The Google Maps Platform Service Specific Terms say “you must not pre-fetch, index, store, or cache any content”. There is the limited exception in there which says you “can cache Places API Place ID (place_id) values”.

If you want to show reviews (or any information about a place returned by the API), then this has to be done on every page refresh. It’s unclear whether running a WordPress full-page caching solution falls foul of this requirement. The API has proven to be responsive, and the impact on website performance is minimal.

This policy also means you can’t legitimately get creative around the “maximum of five” limitation by building a pool of reviews with each request.

Attribution

A final limitation of the API is also due to its terms of use. As part of the API’s terms, you’ll need to display the correct attribution. The requirements are set out in the Policies for Places API guide including a link to download a pack of Google logos suitable for various applications. As this requirement isn’t enforced by the API itself, to avoid violating Google’s terms of service, it’s important to read them and understand them (something that Jackie Weaver knows all too well).

Display Google reviews on your website

Let’s get to work. Here are three steps to integrating Google reviews onto your WordPress site.

Step 1—make sure your business has a Google Business Profile

First, your business needs to be listed on Google Maps. You can create or claim a Google Business Profile (formerly Google My Business). This is what allows you to manage your online presence across Google Search and Google Maps. You can customise your profile, add photos and videos, as well as share updates with customers and potential customers.

If you don’t have a Google Business Profile, it’s free to set up—check out this guide from Google on how to do so.

Step 2find your place ID

Your place ID is a unique identifier that Google uses to reference your business on their platform. You can find your Place ID using the Place ID Finder.

Screenshot of Google's Place ID Finder tool

Step 3—pull in the reviews

The code below uses a WordPress function, wp_remote_get to make a Place Details request. We pass two parameters:

The function handles the HTTP GET request, returning JSON containing all of our reviews. We perform some basic checks before outputting each review.

Taking it further

It’s up to you where you place this PHP—you can create a widget or shortcode, or include it within a page template.

Screenshot of the Willows Veterinary Group website showing a selection of Google reviews

Willows Veterinary Group have been a client of ours for many years. Each practice has its own website, which we run on WordPress multisite. We store configuration information in a central database; one of the fields is for place ID values.

We created a shortcode and pulled the place ID value from our central database. The practice can embed their Google reviews anywhere on their website.

On the front end we show both the overall rating as well as each individual review. We used CodyFrame’s rating component—this gave us beautiful star ratings. Overall our client was pleased with the result.

“We decided to show our Google reviews on our websites, as it’s a great opportunity to build credibility and the pervious system was no longer working for us. Kanuka took on board our comments while we decided how we wanted it to work, and we are absolutely delighted with the final product!”

Kyrie Holmes, Assistant Marketing Manager, Willows Veterinary Group

Conclusion

The Google Places API has a few limitations, but it’s still a simple and effective API for displaying a selection of Google reviews. It won’t, however, help you create a visually appealing review system. That part is up to you, but now you have the tools needed to pull in your reviews!

If you need any assistance displaying Google reviews on your WordPress website, get in touch. At Kanuka Digital, we have over 27 years experience working with small and large businesses alike. We’re a full-service web design, development and marketing agency offering hosting, maintenance, training and more.

We hope this article has helped give you an overview of the Google Places API and how you can make use of it to display your Google reviews on your WordPress website. The next step is actually getting reviews!

Get in touch

If you have any questions or feedback, please reach out to us!

Drop us a line on 01785 279985

Send us an email hello@kanukadigital.com

Quick Enquiry

Your information will be handled in line with our Privacy Policy.