[WordPress] 外掛分享: Ajax Load More: REST API

首頁外掛目錄 › Ajax Load More: REST API
WordPress 外掛 Ajax Load More: REST API 的封面圖片
80+
安裝啟用
尚無評分
286 天前
最後更新
問題解決
WordPress 4.0+ v1.2.6 上架:2017-03-07

內容簡介

這個 REST API 擴充外掛可以使 Ajax Load More 和 WP REST API 外掛之間相容。

輕鬆透過 HTTP REST API 存取您的網站資料(以 JSON 格式),再利用 Ajax Load More 的無限捲動功能美觀地顯示結果。

REST API

作法

REST API 擴充外掛透過將標準的 Ajax Load More admin-ajax.php 請求路由到 API 端點以取得資料。資料以 JSON 格式回傳,再使用 Underscore.js 樣式模板在網站前端進行解析並顯示。

使用簡單的 GET 請求、一個 JavaScript Repeater 模板和專為 Ajax Load More 開發的自訂端點 (/wp-json/ajaxloadmore/posts),使用者可以存取網站資料並使用 WP REST API 實現無限滾動。

查看範例

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Ajax Load More: REST API」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The REST API extension will enable compatibility between Ajax Load More and the WP REST API plugin.
Easily access your website data (as JSON) through an HTTP REST API and display the results using the beauty of infinite scrolling with Ajax Load More.

REST API


How It Works
The REST API add-on works by routing the standard Ajax Load More admin-ajax.php requests through to API endpoints for data retrieval. The data is returned as JSON, then parsed and displayed using Underscore.js styled templates on the front-end of your website.
Using a simple GET request, a JavaScript Repeater Template and a custom endpoint (/wp-json/ajaxloadmore/posts) developed specifically for Ajax Load More, users are able to access website data and infinite scroll the results using the WP REST API.
View Example

延伸相關外掛

文章
Filter
Mastodon