WP_Places

توسط

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
}

  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.

سوالات متداول

پرسش و پاسخی برای این آیتم موجود نیست.
تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
هیچ نسخه‌ای برای این آیتم موجود نیست.
★★★★★
★★★★★
5.0 /5 (9 نظر)

قیمت:

رایگان

نگارش

آخرین انتشار

26 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

10+

نگارش وردپرس

وردپرس 4.0+

تست شده از نسخه

وردپرس 4.9.29

نگارش PHP

-

نسخه ها

0 نسخه