templates - How to replace WordPress sidebars (widget areas) with Gutenberg

admin2025-06-04  1

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
Add a comment  | 

1 Answer 1

Reset to default 1

Like @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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749052238a315947.html

最新回复(0)