Title: WP GeoPosts
Author: fyaconiello
Published: <strong>2012 年 8 月 16 日</strong>
Last modified: 2012 年 8 月 20 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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

# WP GeoPosts

 由 [fyaconiello](https://profiles.wordpress.org/fyaconiello/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-geoposts.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/wp-geoposts/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/wp-geoposts/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/wp-geoposts/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/wp-geoposts/#developers)

 [技術支援](https://wordpress.org/support/plugin/wp-geoposts/)

## 外掛說明

#### Features

 1. Adds `location`, `latitude`, and `longitude` meta + metaboxes to any content type.
 2. Provides an easy to use interface for selecting which content types to apply the
    above meta values. _Note: this allows selection of built in types: page and post
    as well as any registered custom post types._
 3. Provides `WP_GeoQuery` an extended `WP_Query` class for doing distance based and
    geo-aware queries.

Coming Soon!

 * Add support for `within radius` option to WP_GeoQuery
 * HTML5 geolocation of visitors, with a fallback to `Change Location` (stored as
   COOKIE)
 * Custom Markers by post type.
 * Shortags for:
    - `Get Directions` link (utilizing Google Maps)
    - Static Map – show one or more posts on a static map
    - Dynamic Map – show one or more posts on a dynamic map
    - Option to show radius as overlay (for `within radius` calls)

## 安裝方式

#### Installation

 1. Upload the entire `wp-geo-posts` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the `Plugins` menu in WordPress.

#### Setup

 1. Click the `Settings` link on the plugin management page **OR** click the `WP GeoPosts`
    link from the Settings flyout menu.
 2. Generate a Google Maps API Key and enter it into the provided text input. _Note:
    this is optional and used for Google Maps API calls._
 3. Select all of the content types that you wish to attach georelated content from
    the leftmost bank of choices and move them to the rightmost column.
 4. Submit the Form by clicking `Save Changes`.

## 常見問題集

  What are the post meta keys that your metabox adds?

For every post type selected on the plugin settings page. That type’s add/edit screens
will have an additional metabox automatically added. Metadata that is added to each
record:

 * **Location** via `wp_gp_location`
 * **Latitude** via `wp_gp_latitude`
 * **Longitude** via `wp_gp_longitude`

  How do I use WP_GeoQuery? (What is it for?)

Make a geo-aware query against the posts table. `WP_GeoQuery` accepts all arguments
that `WP_Query` takes. `latitude` and `longitude` are optional parameters. If passed,`
distance` is calculated and returned with each result. In addition to the regular
fields, each result returns `latitude`, `longitude`, and `location`.

    ```
    <?php
    $query = new WP_GeoQuery(array(
      'latitude' => '37.5160', // User's Latitude (optional)
      'longitude' => '-77.5005', // User's Longitude (optional)
      'posts_per_page' => 25, // Any regular options available via WP_Query
    ));
    foreach($query->posts as $post)
    {
        echo " {$post->post_title}<br />\n";

        // returned only if latitude and longitude are passed into WP_GeoQuery
        echo " {$post->distance}<br />\n";

        // Always returned by WP_GeoQuery
        echo " {$post->location}<br />\n";
        echo " {$post->latitude}<br />\n";
        echo " {$post->longitude}<br />\n";
        echo "<br />\n";
    }
    ?>
    ```

## 使用者評論

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

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-3174/)󠁿

 [nagman](https://profiles.wordpress.org/nagman/) 2016 年 9 月 3 日

Very easy to use, works perfectly with WP 4.5.3. Yet something is missing: in the
admin panel, it would be great to have autocomplete functionality on the input field.

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/wp-geoposts/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈WP GeoPosts〉的開發相關工作。

參與者

 *   [ fyaconiello ](https://profiles.wordpress.org/fyaconiello/)

[將〈WP GeoPosts〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wp-geoposts)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wp-geoposts/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/wp-geoposts/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/wp-geoposts/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wp-geoposts/)。

## 變更記錄

#### 1.0

 * Initial Release

## 中繼資料

 *  版本 **1.0**
 *  最後更新 **14 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.4.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/wp-geoposts/)
 * 標籤:
 * [distance](https://tw.wordpress.org/plugins/tags/distance/)[geo](https://tw.wordpress.org/plugins/tags/geo/)
   [location](https://tw.wordpress.org/plugins/tags/location/)[metabox](https://tw.wordpress.org/plugins/tags/metabox/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-geoposts/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/wp-geoposts/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/wp-geoposts/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/wp-geoposts/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/wp-geoposts/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/wp-geoposts/reviews/?filter=1)

[撰寫評分](https://wordpress.org/support/plugin/wp-geoposts/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/wp-geoposts/reviews/)

## 參與者

 *   [ fyaconiello ](https://profiles.wordpress.org/fyaconiello/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/wp-geoposts/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://fyaconiello.github.com/wp-geo-posts/)