[WordPress] 外掛分享: Infinite Scroll Block

首頁外掛目錄 › Infinite Scroll Block
WordPress 外掛 Infinite Scroll Block 的封面圖片
300+
安裝啟用
★★★★★
5/5 分(6 則評價)
720 天前
最後更新
問題解決
v1.1.0 上架:2022-11-17

內容簡介

此外掛在完整的網站編輯器中新增一個無限滾動區塊,可用於取代傳統的分頁功能。該區塊可以放置在查詢循環內部,以取代傳統的分頁功能。

在使用這個區塊的前端腳本時,會在使用者距離無限滾動區塊1200px(預設值)時,才開始提取更多的文章,所以最好把它放在您的佈景主題模板區塊的下面。另外,除了無限滾動區塊之外,還包括了兩個可選的區塊:

正在載入文章區塊:當文章還在載入時,此容器會顯示其內容
已經沒有文章區塊:當沒有更多文章可載入時,此容器會顯示其內容

附加說明

雖然您可以在查詢循環區塊內部添加多個無限滾動區塊,但最好不要這樣做。該區塊最初被限制為每個頁面只能添加一個(multiple = false),但為了支持同一頁面上的多個查詢區塊而被移除。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Infinite Scroll Block」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Adds an infinite scroll block to the full site editor that can be placed inside a Query Loop to replace classic pagination.
The blocks frontend script will detect when the user is 1200px (default value) from the infinite scroll block before fetching more posts so it is best to place it right after your theme template block. In addition to the Infinite Scroll Block, 2 optional blocks also are included:

Loading Posts Block: Container that will display its content while more posts are loading
No More Posts Block: Container that will display when there are no more posts to load in

Additional Notes

Adding more than one Post Template Block to a Query Block has undefined behavior.
Adding more than one Infinite Scroll Block to a Query Block has undefined behavior.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon