↖️ Show all posts

jQuery Plugin for showing google places reviews

Inspired by Steven Monson’s magnificent article here: https://www.launch2success.com/guide/display-google-reviews-website-2017/ or check out Steven’s github. Steven’s code is based on peledies jquery plugin repo. So, I simply remixed their work into this little gem of code poetry. Thank you guys!

Source Code on GitHub



Call the Plugin

Grab your place’s ID (https://developers.google.com/places/place-id) and call it as placeId parameter, when calling the plugin.

jQuery(document).ready(function($) {
  if ($("#google-reviews").length == 0) {
  // Find a placeID via https://developers.google.com/places/place-id
    placeId: 'ChIJZa6ezJa8j4AR1p1nTSaRtuQ',
    // the following params are optional (default values)
    header: "<h3>Google Reviews</h3>", // html/text over Reviews
    footer: '', // html/text under Reviews block
    max_rows: 6, // max rows of reviews to be displayed
    min_rating: 4, // minimum rating of reviews to be displayed
    months: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
    text_break_length: "90", // length before a review box is set to max width
    shorten_names: true, // example: "Max Mustermann" -> "Max M.""

⬅️ Read previous Read next ➡️