內容簡介
在WordPress 5.0(Gutenberg版本)發行之前開發的自定分類法可能與WordPress區塊編輯器不兼容。
為了與區塊編輯器相容,自定分類法需要將「show_in_rest」屬性設為「true」。WordPress 4.7中加入了「show_in_rest」,與WordPress JSON REST API整合。使用在此之前創建的自定分類法的網站可能沒有設置此屬性。另外,「show_in_rest」的預設值為「false」(這個文件說明不太清楚),舊的自定分類法將不會顯示在WordPress區塊編輯器介面中。
此外掛將會把「show_in_rest」已設置為「false」的任何自定分類法修改為「true」,但不會添加任何其他REST屬性,例如「rest_base」或「rest_controller_class」。如果您需要設置這些屬性,您需要更新在註冊自定分類法的位置。
外掛標籤
開發者團隊
② 後台搜尋「Custom Taxonomies for Blocks」→ 直接安裝(推薦)
原文外掛簡介
Custom taxonomies that were developed prior to the release of WordPress 5.0 (the Gutenberg release) may not be compatible with the WordPress block editor.
Custom taxonomies require that the “show_in_rest” property be set to “true” in order to work with the block editor. “show_in_rest” was added with WordPress 4.7 and the integration of the WordPress JSON REST API. Sites using custom taxonomies that were created prior to this likely do not have this property set. Additionally, the default value for “show_in_rest” is “false” (this is poorly documented), ergo older custom taxonomies will not appear in the WordPress block editor interface.
This plugin will take any custom taxonomy where the “show_in_rest” feature is set to “false” and change it to “true”. It will not add any additional REST properties, such as “rest_base” or “rest_controller_class”. If you need those properties set for any reason, you will need to update your custom taxonomy where it is being registered.
