Title: WP_Places
Author: Gary Kovar
Published: <strong>16. december, 2015</strong>
Last modified: 11. oktober, 2018

---

Søg plugins

![](https://ps.w.org/wp-places/assets/banner-772x250.png?rev=1314726)

Dette plugin **er ikke blevet testet med de seneste 3 større udgivelser af WordPress**.
Det vedligeholdes eller understøttes muligvis ikke længere og kan have kompatibilitetsproblemer,
når det bruges med nyere versioner af WordPress.

![](https://s.w.org/plugins/geopattern-icon/wp-places_c3c0c0.svg)

# WP_Places

 Af [Gary Kovar](https://profiles.wordpress.org/binarygary/)

[Download](https://downloads.wordpress.org/plugin/wp-places.2.1.2.zip)

 * [Detaljer](https://da.wordpress.org/plugins/wp-places/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/wp-places/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/wp-places/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/wp-places/#developers)

 [Support](https://wordpress.org/support/plugin/wp-places/)

## Beskrivelse

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.

The following shortcodes are available:

 * [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] displays the website
 * [wp_places priceLevel] returns the pricing level as prescribed in google places
   API
 * [wp_places rating] returns the average rating as prescribed in google places 
   API
 * [wp_places lat] lattitude
 * [wp_places lng] longitude
 * [wp_places openNow] returns 1 if open
 * [wp_places openNowText] returns “Open Now” if open
 * [wp_places permanentlyClosed] returns 1 if permanently closed
 * [wp_places photos] returns photos if google supplies them
 * [wp_places reviews] returns a UL list of reviews if google supplies them

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 }

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/WP_Places` directory, or install
    the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in 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.

## Anmeldelser

![](https://secure.gravatar.com/avatar/43cf173fcbc3c7e21628f604f227e7eb4544548ba9dfe26cc3696bf3dd99b41a?
s=60&d=retro&r=g)

### 󠀁[Amazing](https://wordpress.org/support/topic/amazing-2156/)󠁿

 [mahsarhan](https://profiles.wordpress.org/mahsarhan/) 3. april, 2019

Amazing plugin

![](https://secure.gravatar.com/avatar/beba8607de9cabe14c4feb8d8dee8c24be077061b60248e3148276401f66e422?
s=60&d=retro&r=g)

### 󠀁[Excellent plugin!!](https://wordpress.org/support/topic/excellent-plugin-4545/)󠁿

 [hwuser](https://profiles.wordpress.org/hwuser/) 10. januar, 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!!

![](https://secure.gravatar.com/avatar/e961980f1dc4869d95a6247592072f22cb8076787975800b478f94e28ce7aacb?
s=60&d=retro&r=g)

### 󠀁[Totally Sweet](https://wordpress.org/support/topic/totally-sweet/)󠁿

 [jfarley](https://profiles.wordpress.org/jfarley/) 8. maj, 2018

Thank you for making this plugin.

![](https://secure.gravatar.com/avatar/82bd81b933eb37fdfff469755af96a84c0bc8b223b21a876d887f800637f2f7a?
s=60&d=retro&r=g)

### 󠀁[Fantastic.](https://wordpress.org/support/topic/fantastic-805/)󠁿

 [nudone](https://profiles.wordpress.org/nudone/) 1. november, 2016 1 svar

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.

![](https://secure.gravatar.com/avatar/b272eea69d1320bdb03b3084391dbc946d5876b49bda332324f32fa1d054d71d?
s=60&d=retro&r=g)

### 󠀁[Superb Plugin!](https://wordpress.org/support/topic/superb-plugin-110/)󠁿

 [tagsdomino](https://profiles.wordpress.org/tagsdomino/) 3. september, 2016 1 svar

Great – does what it says on the tin!

![](https://secure.gravatar.com/avatar/1884d174ae2a96a9bbe1b07429c386c53edb089addf84ac13e1fb5dbb1a02be2?
s=60&d=retro&r=g)

### 󠀁[Awesome, and great for non-blog sites too!](https://wordpress.org/support/topic/awesome-and-great-for-non-blog-sites-too/)󠁿

 [dis-annie](https://profiles.wordpress.org/dis-annie/) 3. september, 2016 1 svar

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!!

 [ Læs alle 9 anmeldelser ](https://wordpress.org/support/plugin/wp-places/reviews/)

## Bidragsydere & udviklere

“WP_Places” er open source-software. Følgende personer har bidraget til dette plugin.

Bidragsydere

 *   [ Gary Kovar ](https://profiles.wordpress.org/binarygary/)

“WP_Places” er blevet oversat til 1 sprog. Tak til [oversætterne](https://translate.wordpress.org/projects/wp-plugins/wp-places/contributors)
for deres bidrag.

[Oversæt “WP_Places” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/wp-places)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/wp-places/), tjek [SVN repository](https://plugins.svn.wordpress.org/wp-places/),
eller abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/wp-places/)
via [RSS](https://plugins.trac.wordpress.org/log/wp-places/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 2.1.1

 * Adds a filter for transient time.

#### 2.1.0

 * 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.

#### 2.0.6

 * Fixes bug related to losing google place ID.

#### 2.0.5

 * ¯_(ツ)_/¯

#### 2.0.4

 * Adds support for including in CPT.

#### 2.0.0

 * massive refactoring that will allow quicker fixes going forward.

#### 1.1.18

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

#### 1.1.17

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

#### 1.1.16

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

#### 1.1.15

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

#### 1.1.14

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

#### 1.1.13

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

#### 1.1.12

 * 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

#### 1.1.11

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

#### 1.1.10

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

#### 1.1.9

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

#### 1.1.8

 * Fixed logic where no photos/reviews would throw error

#### 1.1.7

 * added shortcode for reviews and images

#### 1.1.6

 * on activation enable embed div display

#### 1.1.5

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

#### 1.1.4

 * fixed bone-headed mistake that hid the div

#### 1.1.3

 * shortcodes made live
 * fixed spelling errors

#### 1.1.2

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

#### 1.1.1

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

#### 1.1.0

 * 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

#### 1.0.6

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

#### 1.0.5

 * removed confusing menu stub

#### 1.0.4

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

#### 1.0.3

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

#### 1.0.2

 * Fixed confusing field name

#### 1.0.1

 * Fixed launching with no settings visibility

#### 1.0

 * Initial Launch!

## Meta

 *  Version **2.1.2**
 *  Senest opdateret **8 år siden**
 *  Aktive installationer **10+**
 *  WordPress-version ** 4.0 eller højere **
 *  Testet op til **4.9.29**
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/wp-places/) og [Italian](https://it.wordpress.org/plugins/wp-places/).
 *  [Oversæt til dit sprog](https://translate.wordpress.org/projects/wp-plugins/wp-places)
 * Tags
 * [Business Information](https://da.wordpress.org/plugins/tags/business-information/)
   [google places](https://da.wordpress.org/plugins/tags/google-places/)[location](https://da.wordpress.org/plugins/tags/location/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/wp-places/advanced/)

## Bedømmelser

 5 ud af 5 stjerner.

 *  [  9 5-stjernet anmeldelser     ](https://wordpress.org/support/plugin/wp-places/reviews/?filter=5)
 *  [  0 4-stjernet anmeldelser     ](https://wordpress.org/support/plugin/wp-places/reviews/?filter=4)
 *  [  0 3-stjernet anmeldelser     ](https://wordpress.org/support/plugin/wp-places/reviews/?filter=3)
 *  [  0 2-stjernet anmeldelser     ](https://wordpress.org/support/plugin/wp-places/reviews/?filter=2)
 *  [  0 1-stjernet anmeldelser     ](https://wordpress.org/support/plugin/wp-places/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-places/reviews/#new-post)

[Se alle anmeldelser.](https://wordpress.org/support/plugin/wp-places/reviews/)

## Bidragsydere

 *   [ Gary Kovar ](https://profiles.wordpress.org/binarygary/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/wp-places/)