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

Block Pattern Builder

外掛說明

Block Pattern Builder 是一款能讓終端使用者使用 WordPress 外掛目錄中的項目建立自訂區塊版面配置的簡易外掛。這個外掛的最低環境需求為 Gutenberg 7.8/WordPress 5.5 或更新版本。如果網站使用的 WordPress 核心程式版本太低,Gutenberg 外掛必須滿足最低環境需求。

如需進一步了解區塊版面配置的相關資訊,請參考以下連結:

外掛使用方式

安裝外掛並啟用後,便會在 WordPress 管理後台看到 [區塊版面配置] 選單項目。網站管理員可以透過這些選單項目建立新的區塊版面配置,建立方式與新增文章或頁面相同。

區塊版面配置的想法來自於建立之後可再次使用的「可重複使用區塊」或區塊區段,發佈區塊版面配置後,便會出現在區塊庫中供網站作者使用。

只要前往文章或頁面點擊 [區塊版面配置] 即可使用。點擊內容編輯區左上角的 [區塊庫] 圖示,然後點擊 [區塊版面配置] 分頁。在 [區塊版面配置] 中選取 [未分類],便能使用已建立的自訂區塊版面配置,點擊後便會插入至文章或頁面中。

從 1.1.0 版開始,使用者可以直接在編輯器中建立區塊版面配置。點擊編輯器工具列上的 [更多設定] 按鈕 (省略符號圖示) 並選取至少一個區塊,然後點擊 [新增至區塊版面配置]。

螢幕擷圖

  • 區塊版面配置管理頁面
  • 建立自訂區塊版面配置
  • 在文章編輯器中插入區塊版面配置

常見問題集

開發這個外掛的主要目的為何?

我認為不用撰寫程式碼,直接在管理後台建置區塊版面配置,會是一件非常方便的事。

系統顯示自訂的區塊版面配置無效,該如何處理?

如果發生這種狀況,代表區塊版面配置發生問題。請查看是否能自行解決這個問題。目前區塊版面配置仍在早期開發階段,因此發生問題是可以預見的。

我是否能使用這個外掛為我開發的佈景主題建置區塊版面配置?

是的,當然可以。你可以在管理後台建置區塊版面配置,然後在程式碼編輯器中複製區塊版面配置的程式碼。接下來請使用 register_pattern() 函式將區塊版面配置註冊於佈景主題的 functions.php 檔案中。透過這個方式,你便能將區塊版面配置提供給你的佈景主題使用者使用。

使用者評論

2022 年 1 月 11 日
This is a clean and simple, but very helpful plugin to create your own block patterns. If it had the option to manage block pattern categories as well, I'd consider even a 5 star rating… 😉
2020 年 12 月 23 日
The Block Pattern Builder allows me to quickly use blocks over and over again, which is really essential to create content quickly and consistently. The only issue I have right now is that the patterns in the bottom of my list of 13 patterns are not listed when I search for them in the Gutenberg editor. If I have two patterns with "h2" in their name, it only shows the to one, for example. Not sure what is causing that? I hope a future version allows to change the saved pattern and apply the changes site wide (structure and design, not the content obviously). That would make maintenance so much more efficient. But I think it's a WordPress limitation at the moment, rather than a plugin limitation.
2020 年 12 月 3 日 2 則留言
I REALLY like this plugin, but it is conflicting with Gutenberg Plugin v9.1.1 When inserting Block > choosing Browse All > then selecting Patterns ...... It gets an error The editor has encountered an unexpected error. Just respond that you got this .... then it goes back to 5 Stars! Thanks, looking forward to using. ------------------------------------- Due to "Bianca (@bianca205)", putting this to 5 Stars ... I hope she will forward this to the right people.
2020 年 11 月 26 日
Thanks Justin for creating such a useful nifty plugin. I does not seem perfect in the way of finding and inserting the patterns in posts, but I am sure you will solve that.
閱讀全部 13 則使用者評論

參與者及開發者

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

參與者

〈Block Pattern Builder〉外掛目前已有 2 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Block Pattern Builder〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

變更記錄儲存於外掛安裝資料夾中的 changelog.md 檔案中,同時也可以前往 GitHub 檢視線上變更記錄