Questo plugin non è stato testato con le ultime 3 versioni principali (major releases) di WordPress. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare problemi di compatibilità se utilizzato con versioni più recenti di WordPress.



If you find you regularly write blog posts about (local?) places you might want to provide info such as hours, phone number, address to your users. However, this can be difficult to keep current. Fortunately Google offers an API called Google Places API Web Service. Google Place API Web Service allows you to Add up-to-date information about millions of locations.

WP_Places Plugin requires a Google Places API Web Service Key. However, at the time of writing the API key is free and provides up to 1,000 requests per 24 hour period. If you verify your identity (by providing Google a Credit Card) they will increase your daily request per 24 hours to 150,000.

Once Installed, WP_Places takes name and location and displays a DIV containing Business Name, Address, Hours, Phone Number, Website.

Sono disponibili i seguenti shortcode:

  • [wp_places name] displays the Google Places name
  • [wp_places formattedAddress] displays the address in the regionally standardized way
  • [wp_places phoneNumber] displays the phone number in the regionally standardized way
  • [wp_places hours] displays the hours of operation in a list
  • [wp_places website] visualizza il sito web
  • [wp_places priceLevel] returns the pricing level as prescribed in google places API
  • [wp_places rating] restituisce la media dei voti come descritto nelle Google Places API
  • [wp_places lat] latitudine
  • [wp_places lng] longitudine
  • [wp_places openNow] restituisce 1 se l’attività è aperta
  • [wp_places openNowText] restituisce “Aperto Ora” se l’attività è aperta
  • [wp_places permanentlyClosed] restituisce 1 se l’attività risulta chiusa definitivamente
  • [wp_places photos] restituisce le foto, se google le fornisce
  • [wp_places reviews] restituisce una lista html UL delle recensioni, se google le fornisce

To filter how long to cache the google reply there is a filter:

add_filter( ‘wp_places_transient’, ‘wp_places_update_transient’, 10, 1 );
wp_places_update_transient( $time ) {
// return a value in seconds for how long to cache.
return 86400; // one day
return 604800 // one week


  1. Upload the plugin files to the /wp-content/plugins/WP_Places directory, or install the plugin through the WordPress plugins screen directly.
  2. Attiva il plugin tramite la schermata ‘Plugin’ di WordPress.
  3. Use the Settings page on the WP_Places page to add your Google Places API Web Services Key.
  4. When writing a post about a business, add the business name and address to the WP_Places field.


10 Gennaio 2019
Excellent plugin, it works very well and saves you a lot of time by not having to copy all the google data in your post. In addition, you will always have your web updated, with address, phone, hours etc ... An improvement would be to save the data in wp and this data will be updated every 15 or 30 days. When someone enters the post, they take the saved data, and if it has been stored for more than 30 days they are taken by Google with the API, and if less than 30 days ago they are saved, they do not consult google and show the saved data, so you avoid that every time someone enters the post you use the google API that with many queries is paid. Many thanks!!
1 Novembre 2016 1 risposta
After searching for plugins that might help with "Google My Business" details and finding nothing suitable I was losing all hope. A bit more reading lead me to realise I needed "Google Places" data instead - but there was still the problem of having to learn about the API to obtain the correct data from a json file. Again, I started to lose all hope as the api stuff seemed far too complicated. The solution - this plugin "WP_Places". Thanks for creating it Gary.
3 Settembre 2016 1 risposta
This is an amazing little plugin! Very easy to use with simple shortcodes. I use it on my business websites, and how great to be able to show at a glance that the business is currently open. It's also nice that it brings in the Google Places information, not just something hardcoded. It forces me to keep Google Places up-to-date. Thanks!!
Leggi tutte le recensioni di 9

Contributi e sviluppo

“WP_Places” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.


“WP_Places” è stato tradotto in 1 lingua. Grazie ai traduttori per i loro contributi.

Traduci “WP_Places” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il Codice segui il Repository SVN iscriviti al Log delle Modifiche. Puoi farlo tramite RSS con un lettore di feed.

Changelog (registro delle modifiche)


  • Adds a filter for transient time.


  • Enables google auto-complete on the input form on posts.
  • Adds a dismissible admin notice on CPT creation if Google Places API has not been set up.
  • Defaults to adding the metabox to posts and pages for quicker place association after initial set up.


  • Fixes bug related to losing google place ID.


  • ¯_(ツ)_/¯


  • Adds support for including in CPT.


  • massive refactoring that will allow quicker fixes going forward.


  • user tagsdomino pointed out an error with preg_replace in PHP7 and proposed using str_replace. Thanks! tagsdomino.


  • Store meta data for lat/lon
  • Reversed course on serializing transient thanks to @salcode
  • Proposing we appoint @salcode lifeguard of twitter


  • Serialized response array so transients don’t duplicate calls to the google places api within short amounts of time


  • Fixed a mis-spelling
  • Updated tested up to version number


  • Fixed a bug that caused posts to be display empty when google ID is not set.


  • Fixed a whole heap of array references that were throwing PHP notices.


  • Fixed an error that showed locations as closed in some edge cases
  • Handles & in location name with special thanks to bartdyer for a simple solution


  • Handled situation where API response did not have all data set
  • Quieted down a bunch of PHP Notices


  • Fixed logic in hours when location doesn’t provide hours


  • Added Text ouput shortcode for Open Now [wp_places openNowText] (thanks Bart!)


  • Fixed logic where no photos/reviews would throw error


  • added shortcode for reviews and images


  • on activation enable embed div display


  • added column view to all posts
  • added transient to prevent repeated shortcode use from causing repeat queries
  • fixed longitude shortcode
  • fixed hours display shortcode


  • fixed bone-headed mistake that hid the div


  • shortcodes made live
  • fixed spelling errors


  • Fixed labels again
  • Shortcodes setup
  • Added toggle for displaying the embedded DIV


  • CSS is no longer hard-coded
  • Fixed confusing label on new menu page


  • Added menu page specifically for WP_Places
  • checked to see if content has multiple paragraphs before inserting content at the beginning of the 2nd paragraph


  • moved default location to the end of the 1st paragraph after frantically realizing embedding at the beginning meant that social sharing was funky


  • removed confusing menu stub


  • Now shows within the posts section the location name that was returned from Google
  • “Open Now” status is working.


  • I misspleeeldead services in teh 1.0.2 release
  • Fixed image location url


  • Fixed confusing field name


  • Fixed launching with no settings visibility


  • Initial Launch!