admin管理员组文章数量:1130349
I'm trying to build my first Gutenberg theme, and I want to build a page template with the layout as shown below:
Pre-Gutenberg I would have built widget areas into the page template to create the layout. i.e. widget areas for the sidebar, and widget area 1 + 2.
I'm trying to do this now with blocks, and I want to know what correct approach or best practise is for replacing widget areas in Gutenberg when developing themes, could this be achieved with InnerBlocks, or NestedBlocks? Or some other means? Can anyone point me to examples?
I'm trying to build my first Gutenberg theme, and I want to build a page template with the layout as shown below:
Pre-Gutenberg I would have built widget areas into the page template to create the layout. i.e. widget areas for the sidebar, and widget area 1 + 2.
I'm trying to do this now with blocks, and I want to know what correct approach or best practise is for replacing widget areas in Gutenberg when developing themes, could this be achieved with InnerBlocks, or NestedBlocks? Or some other means? Can anyone point me to examples?
Share Improve this question asked Dec 30, 2018 at 10:47 benedict_wbenedict_w 5912 gold badges7 silver badges17 bronze badges 2- 2 Problem is right now Gutenberg is only available in the content area through the editor. Phase 2 will include widgets as blocks. – Alvaro Commented Dec 30, 2018 at 12:45
- 1 @Alvaro any ideas when phase 2 will arrive? – benedict_w Commented Jan 3, 2019 at 10:45
1 Answer
Reset to default 1Like @Alvaro said, You should start building blocks for widget areas. Once Phase 2 hit the core you can just simply show the blocks in other areas. Don't bother developing for Pre-Gutenberg widgets, You will double your work load.
I'm trying to build my first Gutenberg theme, and I want to build a page template with the layout as shown below:
Pre-Gutenberg I would have built widget areas into the page template to create the layout. i.e. widget areas for the sidebar, and widget area 1 + 2.
I'm trying to do this now with blocks, and I want to know what correct approach or best practise is for replacing widget areas in Gutenberg when developing themes, could this be achieved with InnerBlocks, or NestedBlocks? Or some other means? Can anyone point me to examples?
I'm trying to build my first Gutenberg theme, and I want to build a page template with the layout as shown below:
Pre-Gutenberg I would have built widget areas into the page template to create the layout. i.e. widget areas for the sidebar, and widget area 1 + 2.
I'm trying to do this now with blocks, and I want to know what correct approach or best practise is for replacing widget areas in Gutenberg when developing themes, could this be achieved with InnerBlocks, or NestedBlocks? Or some other means? Can anyone point me to examples?
Share Improve this question asked Dec 30, 2018 at 10:47 benedict_wbenedict_w 5912 gold badges7 silver badges17 bronze badges 2- 2 Problem is right now Gutenberg is only available in the content area through the editor. Phase 2 will include widgets as blocks. – Alvaro Commented Dec 30, 2018 at 12:45
- 1 @Alvaro any ideas when phase 2 will arrive? – benedict_w Commented Jan 3, 2019 at 10:45
1 Answer
Reset to default 1Like @Alvaro said, You should start building blocks for widget areas. Once Phase 2 hit the core you can just simply show the blocks in other areas. Don't bother developing for Pre-Gutenberg widgets, You will double your work load.
本文标签: templatesHow to replace WordPress sidebars (widget areas) with Gutenberg
版权声明:本文标题:templates - How to replace WordPress sidebars (widget areas) with Gutenberg 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749052202a2308791.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论