MyListing Google Reviews Feed
The {CODICTS} MyListing Google Reviews Feed plugin displays Google Reviews directly on MyListing listing pages using a simple shortcode. It fetches reviews from the Google Places API using either a stored Place ID or by automatically searching for the listing’s business name, then renders a styled review feed on the frontend.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
After activation, navigate to “MyListing Google Reviews Feed” in the WordPress admin sidebar to enter your Google Places API key.
Setting Up Your Google Places API Key
Before the plugin can fetch reviews, you need a Google Places API key.
1. Go to the Google Cloud Console.
2. Create a project (or select an existing one).
3. Enable the Places API for your project. The plugin uses two endpoints: “Find Place from Text” (to look up a Place ID from a business name) and “Place Details” (to fetch reviews).
4. Navigate to APIs & Services → Credentials and create an API key.
5. (Recommended) Restrict the API key to only the Places API and your server’s IP address for security.
6. Copy the API key.
7. In WordPress admin, go to MyListing Google Reviews Feed in the sidebar.
8. Paste the API key into the “Google Places API Key” field.
9. Save changes.
Billing note: Both Google Places API endpoints used by this plugin are billable by Google. Enable the “Cache requests?” option in the plugin settings to minimize API calls and reduce costs.
Settings Page
Navigate to MyListing Google Reviews Feed in the WordPress admin sidebar.
| Setting | Default | Description |
|---|---|---|
| Google Places API Key | (empty) | Your Google Places API key. Required for all review fetching. |
| Cache requests? | Off | When enabled, review output is cached to reduce API calls and billing costs. Cached reviews are served without making new API calls until the cache expires. |
How It Works
The plugin provides a shortcode that you place on listing pages. When the shortcode is rendered, it:
1. Identifies the current listing (or a listing you specify by ID).
2. Determines the Google Place ID using one of three methods (in priority order):
| Priority | Method | Description |
|---|---|---|
| 1st | Place ID field | If you specify a place_id_field attribute, the plugin reads the Google Place ID directly from that listing field. Most efficient — skips the text search API call entirely. |
| 2nd | Text search field | If you specify a text_search_field attribute, the plugin uses that field’s value to search Google Places for a matching Place ID. |
| 3rd | Listing title | If no attributes are specified, the plugin uses the listing’s title to search Google Places automatically. |
3. Calls the Google Places Details API to fetch reviews for that Place ID.
4. Renders the reviews as HTML on the page — showing each reviewer’s photo, name, star rating, date, and review text.
Google API limitation: The Google Places API returns a maximum of 5 reviews per place. This is a Google limitation and cannot be changed by the plugin. The reviews returned are the “most relevant” as determined by Google’s algorithm.
Shortcode Usage
Basic Usage
Place this shortcode on a single listing page (e.g., in a Text Block or Raw content block). It automatically detects the current listing and searches Google Places using the listing’s title:
[codicts-mylisting-google-reviews-feed]
Shortcode Attributes
| Attribute | Required | Description |
|---|---|---|
| id | No | The listing (post) ID to fetch reviews for. Defaults to the current listing. |
| place_id_field | No | A MyListing field key that stores a Google Place ID directly. Most efficient — eliminates the text search API call. |
| text_search_field | No | A MyListing field key whose value is used to search Google Places (e.g., a “business name” field). |
Examples
Auto-detect listing and search by title (simplest):
[codicts-mylisting-google-reviews-feed]
Use a custom field that stores the Google Place ID (most efficient):
[codicts-mylisting-google-reviews-feed place_id_field="google_place_id"]
Use a custom text field for the search query:
[codicts-mylisting-google-reviews-feed text_search_field="business_name"]
Specify a listing by ID with a Place ID field:
[codicts-mylisting-google-reviews-feed id="456" place_id_field="my_place_id_field"]
Tip: Using
place_id_fieldis the recommended approach. It eliminates the “Find Place from Text” API call entirely, saving both load time and billing costs. Add a text field to your listing type where listing owners (or you) can paste the Google Place ID for their business.
Where to Find a Google Place ID
To find a business’s Google Place ID, use Google’s Place ID Finder tool. Search for the business, and the Place ID will be displayed (it looks like ChIJN1t_tDeuEmsRUsoyG83frY4).
Where to Add the Shortcode
You can add the shortcode in several places:
| Location | How |
|---|---|
| MyListing content block | Add a “Raw” or “Text Block” content block on the listing type’s Single Page tab and paste the shortcode inside. |
| WordPress page or post | Paste the shortcode directly into the content editor (with a specific id attribute). |
| Elementor | Use an Elementor Shortcode widget or Text Editor widget. |
| Widget area | Use a Text widget in any sidebar or widget area. |
Styling the Reviews
The plugin outputs review HTML with CSS classes but does not include frontend styles. This gives you full control over the appearance. Add custom CSS to your child theme’s style.css or via Appearance → Customize → Additional CSS.
Each review displays the reviewer’s profile photo, name, star rating (as ★ characters), relative date (e.g., “2 months ago”), and review text.
CSS Classes Available
| Class | Element |
|---|---|
.google-reviews | Outer wrapper around all reviews. |
.review | Individual review card. |
.review-avatar | Reviewer’s Google profile photo. |
.review-author | Reviewer’s display name. |
.review-stars | Star rating (★ characters). |
.review-date | Relative date text. |
.review-text | Review body text. |
Example Starter CSS
Copy this into your child theme or Additional CSS to get a clean card-based layout:
.google-reviews {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.google-reviews .review {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 20px;
flex: 1 1 300px;
max-width: 100%;
}
.google-reviews .review-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
margin-bottom: 10px;
}
.google-reviews .review-author {
font-weight: bold;
margin-bottom: 5px;
}
.google-reviews .review-stars {
color: #fbbc04;
font-size: 18px;
margin-bottom: 5px;
}
.google-reviews .review-date {
color: #70757a;
font-size: 13px;
margin-bottom: 10px;
}
.google-reviews .review-text {
font-size: 14px;
line-height: 1.5;
color: #3c4043;
}
Example Setup — Restaurant Reviews
1. Activate the plugin with the MyListing theme active.
2. Navigate to MyListing Google Reviews Feed in the admin sidebar. Enter your Google Places API key and enable “Cache requests?” to reduce billing costs. Save.
3. Edit your “Restaurants” listing type. On the Fields tab, add a text field with the key google_place_id and label “Google Place ID.” This is where listing owners (or you) will paste each restaurant’s Google Place ID.
4. On the Single Page tab, add a “Raw” or “Text Block” content block. Paste this shortcode inside:
[codicts-mylisting-google-reviews-feed place_id_field="google_place_id"]
5. Save the listing type.
6. Edit a restaurant listing and paste its Google Place ID into the “Google Place ID” field (find it using Google’s Place ID Finder). Save the listing.
7. Visit the restaurant’s listing page. The shortcode fetches up to 5 Google reviews and displays them — showing each reviewer’s photo, name, star rating, date, and text.
8. Add custom CSS to style the reviews to match your site’s design.
Example Setup — Automatic Title Search (No Place ID Field)
If you don’t want to manually enter Place IDs for each listing, you can let the plugin search Google Places automatically using the listing’s title.
1. Complete the API key setup as above.
2. Add a “Raw” or “Text Block” content block to your listing type’s Single Page with just:
[codicts-mylisting-google-reviews-feed]
3. The plugin will use each listing’s title to search Google Places automatically. This works best when listing titles match the exact business name as it appears on Google Maps.
Note: The automatic title search makes an additional API call (“Find Place from Text”) on each page load (unless cached). Using a Place ID field is more reliable and cost-effective, especially for high-traffic sites.
Frequently Asked Questions
Does this require a child theme?
No. The plugin does not override any template files. It operates entirely through a shortcode and an admin settings page.
Is there a settings page?
Yes. Navigate to MyListing Google Reviews Feed in the WordPress admin sidebar to enter your API key and configure caching.
How many reviews does Google return?
The Google Places API returns a maximum of 5 reviews per place. This is a Google API limitation that cannot be changed by the plugin. Google returns the “most relevant” reviews as determined by its algorithm.
How do I reduce Google API billing costs?
Enable the “Cache requests?” option in the plugin settings. Also, use the place_id_field attribute with a field containing the Google Place ID — this eliminates the “Find Place from Text” API call, cutting the number of billable requests in half.
Why does the shortcode show “Location ID not found”?
The Google Places text search could not match your listing’s title (or custom field value) to a location on Google Maps. Solutions: use a place_id_field with the exact Google Place ID, verify the listing title matches the business name as it appears on Google Maps, or check that your API key has the Places API enabled.
Can I show reviews in a language other than English?
The plugin currently requests reviews in English. To change this, the language parameter in the API request would need to be modified in the plugin’s source code. Contact support for assistance.
Why don’t I see any styles on the reviews?
The plugin intentionally does not include frontend CSS, giving you full control over the appearance. Add custom CSS to your child theme or via Appearance → Customize → Additional CSS. See the “Styling the Reviews” section above for example CSS and available classes.
How do I find a business’s Google Place ID?
Use Google’s Place ID Finder tool. Search for the business name and the Place ID will be displayed (it looks like ChIJN1t_tDeuEmsRUsoyG83frY4).
Does the plugin create any database tables?
No. The plugin stores its settings as a single entry in the WordPress options table. Cached review data is stored as standard WordPress transients. No custom database tables are created.
What happens when the plugin is deactivated?
The shortcode will stop rendering and reviews will no longer appear on listing pages. Your settings are preserved in the database in case you reactivate. Cached transients expire naturally.
Troubleshooting
Reviews Not Displaying — Blank Output
| Cause | Solution |
|---|---|
| API key not entered | Navigate to MyListing Google Reviews Feed in the admin sidebar and enter your Google Places API key. |
| Places API not enabled | Go to the Google Cloud Console, select your project, and ensure the Places API is enabled. |
| Server can’t make HTTP requests | The plugin requires allow_url_fopen to be enabled in your PHP configuration. Contact your hosting provider to enable it. |
| Listing has no reviews on Google | The Google Place may not have any reviews yet. Verify by searching for the business on Google Maps and checking the reviews section. |
“Location ID Not Found”
| Cause | Solution |
|---|---|
| Title doesn’t match Google | The listing title or search field value doesn’t match a business on Google Maps. Verify the name matches exactly. Use the place_id_field attribute with a stored Place ID for reliable results. |
| API key restrictions | Your API key may be restricted to certain APIs or IP addresses. Check the API key configuration in Google Cloud Console. |
Stale or Outdated Reviews
| Cause | Solution |
|---|---|
| Cached data | If caching is enabled, reviews are served from cache until the transient expires. Temporarily disable “Cache requests?” in the plugin settings, visit the listing page to fetch fresh reviews, then re-enable caching. |
PHP Warning About file_get_contents()
| Cause | Solution |
|---|---|
| allow_url_fopen disabled | Your server has allow_url_fopen disabled in PHP. Contact your hosting provider to enable this setting, as the plugin requires it to make HTTP requests to the Google API. |
“MyListing Theme Not Detected” Error
The MyListing theme must be installed and active. Go to Appearance → Themes to verify. If using a child theme, the parent theme must still be MyListing.
For further support, visit codicts.com or contact us at support@codicts.com.