首页 > 解决方案 > 如何使自定义分类法出现在 Gutenberg BLOCK LIST 中

问题描述

在 WordPress Gutenberg 编辑器中,我们有默认类别BLOCK(如屏幕截图所示)如何在 Gutenberg BLOCK LIST 中添加我的自定义分类(名为 Leaning)块

我试过这段代码,但不工作:

wp.data.select('core').getEntityRecords('taxonomy', 'learning');

在此处输入图像描述

所以我希望分类法“Leaning”作为一个 BLOCK ,当我添加那个 BLOCK 时,它的术语列表需要显示(例如:编程、设计、营销......)

标签: wordpresscustom-taxonomywordpress-gutenberggutenberg-blocks

解决方案


推荐阅读