[WordPress] 外掛分享: REST API Search

前言介紹

  • 這款 WordPress 外掛「REST API Search」是 2016-04-06 上架。
  • 目前有 30 個安裝啟用數。
  • 上一次更新是 2016-06-20,距離現在已有 3240 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.4 以上版本才可以安裝。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

kcpt | fastmover |

外掛標籤

search | rest-api | API Search | REST API Search |

內容簡介

REST API 搜尋

僅適用於 REST API 外掛的第 2 版本

這個外掛提供了在 WordPress REST API 中缺失的搜尋功能。
當前 REST API 第 2 版本的問題是,你只能基於每個文章類型搜尋。

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

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

這個外掛的功能

為除了修訂版本和設為「exclude_from_search」的類型的所有文章類型添加搜尋功能。

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

如果是多個單字,只需用加號取代空格。

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

還可輕鬆翻頁

第 2 頁:

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

第 3 頁:

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

Github

原文外掛簡介

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

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「REST API Search」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.2 | 1.3 | 1.4 | trunk |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Mastodon