Title: REST API Search
Author: KCPT
Published: <strong>2016 年 4 月 7 日</strong>
Last modified: 2016 年 6 月 20 日

---

搜尋外掛

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

![](https://s.w.org/plugins/geopattern-icon/rest-api-search.svg)

# REST API Search

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

[下載](https://downloads.wordpress.org/plugin/rest-api-search.1.4.zip)

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

 [技術支援](https://wordpress.org/support/plugin/rest-api-search/)

## 外掛說明

REST API Search

### This is only for Version 2 of the REST API Plugin

This adds the missing functionality of Search into the WordPress REST API.
 The 
issue being with the current REST API Version 2, you can only search on a per post_type
basis.

    ```
    /wp-json/wp/v2/posts?filter[s]=apples

    /wp-json/wp/v2/pages?filter[s]=apples
    ```

### What this plugin does.

**Adds the search functionality for all posts types except revisions and types with‘
exclude_from_search’ set to true.**

    ```
    /wp-json/wp/v2/search/apples
    ```

**In case of a multi word string, just replaces the spaces with plus signs.**

    ```
    /wp-json/wp/v2/search/apples+pears
    ```

**Also adds easy paging**

page 2:

    ```
    /wp-json/wp/v2/search/apples+pears/2
    ```

page 3:

    ```
    /wp-json/wp/v2/search/apples+pears/3
    ```

[Github](https://github.com/KCPT19/REST-API-Search)

## 安裝方式

This section describes how to install the plugin and get it working.

e.g.

 1. Upload the plugin files to the `/wp-content/plugins/rest-api-search` directory,
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## 常見問題集

  How do I use this plugin?

This plugin is meant to be used by experienced developers. You can access the search
by going to your WordPress URL, and adding the following to the end of the URL: /
wp-json/wp/v2/search/
 After the search/ you put any keywords you’re searching for,
replaces spaces with plus (+) signs.

## 使用者評論

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

### 󠀁[This plugin is awesome!!!](https://wordpress.org/support/topic/this-plugin-is-awesome-38/)󠁿

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

This has made my life so much better!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

## 參與者及開發者

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

參與者

 *   [ KCPT ](https://profiles.wordpress.org/kcpt/)
 *   [ Fastmover ](https://profiles.wordpress.org/fastmover/)

[將〈REST API Search〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/rest-api-search)

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

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

## 變更記錄

#### 1.0

 * Initial Version
 * Fully working version which searches all post types except revisions and types
   with ‘exclude_from_search’ set to true.

#### 1.1

 * Restructured code to allow for custom fields added in by other plugins

#### 1.2

 * Bug Fix – namespace variable of class needs to be protected.

#### 1.3

 * Now allows for encoded characters and numbers in the url

#### 1.4

 * WordPress’s posts per page settings now are used.

## 中繼資料

 *  版本 **1.4**
 *  最後更新 **10 年前**
 *  啟用安裝數 **20+**
 *  WordPress 版本需求 ** 4.4 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.5.33**
 *  語言
 * [English (US)](https://wordpress.org/plugins/rest-api-search/)
 * 標籤:
 * [rest-api](https://tw.wordpress.org/plugins/tags/rest-api/)[search](https://tw.wordpress.org/plugins/tags/search/)
 *  [進階檢視](https://tw.wordpress.org/plugins/rest-api-search/advanced/)

## 評分

 5 星，滿分為 5 星

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

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

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

## 參與者

 *   [ KCPT ](https://profiles.wordpress.org/kcpt/)
 *   [ Fastmover ](https://profiles.wordpress.org/fastmover/)

## 技術支援

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

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

## 贊助

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

 [ 贊助這個外掛 ](https://kcpt.org/donate/)