$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>templates - How to replace WordPress sidebars (widget areas) with Gutenberg|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far