In April, I had written about Full Site Editing (FSE) coming to WordPress. The idea is to expand the notion of widgets to outside just the post or page content area, and allow users to place them in other areas of the theme like the header, footer, and sidebars. While we haven’t yet reached FSE, today in July 2021, WordPress is taking a massive step towards Full Site Editing with version 5.8. In this, WordPress is now allowing users to use blocks in the widget area.
This is a big deal. We already use widgets in most customizable areas of our site. The sidebars, the footers, and sometimes even the headers. It depends on the theme and those areas where the developer has allowed widgets. So even without FSE, the ability to use blocks here pretty much transforms site design. Thanks to the huge database of WordPress blocks, we now have a lot more flexibility in how we want our site to look.
Upgrading to WordPress 5.8
When you update to version 5.8, you’ll see an explanation of the new feature like this:
As you can see, they’re pretty proud of this latest move! This has been in the works for a long time, and it’s only now after a huge amount of testing, that they’re finally releasing it.
Older Themes May Have a Problem
Because of the big structural change in coding, older WordPress themes and some plugins might interfere with the way widgets work. I have two websites on older themes, and they’ve both reacted differently. On one of them, the widgets screen in the admin dashboard just refused to show up. When I turned on debugging to see the error message, I got this notice:
Notice: wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).
I haven’t dug too deeply into this error message, so I can’t be sure what’s going on. It’ll only appear if you’ve turned on debugging information in wp-config.php, so you shouldn’t see it on a live site. More worrying was the non-functionality of the widgets screen. Until these bugs are ironed out, or until you identify the source of the problem, you can revert to the functionality of the original widget screen by installing the official “Classic Widgets” plugin from WordPress itself. It’ll be maintained till at least 2022, or even beyond if necessary.
The other older theme’s widget page was broken as well, but I was able to use the blocks within widgets with the theme customizer (shown below). So your mileage may vary.
How to Add Blocks to WordPress Widgets
There are two ways to use blocks in WordPress widget areas.
The first is to go to the “Widgets” section as before and start adding them natively like this:
As you can see, you can now add widget areas to all places where you previously had widgets on the left-hand side of the screen. The flow should be familiar to anyone who’s added widgets to WordPress.
I prefer the second method because you can see the changes before finally committing them. Go to the WordPress theme customizer, and click the “Widgets” section. There, you can choose which widget area you want to edit, and add the blocks. Here’s a screenshot:
The benefit of this approach is that you can now see the changes before you save them. The live preview on the right-hand side should update in real-time as you add your blocks to the widget areas. Once you’re satisfied with the changes, save them, and you’re done!
This new version of WordPress is a huge step towards full-scale FSE. Most themes can completely change the way they look simply by manipulating the appropriate widget areas and inserting the blocks of their choice. It’s a wonderful step in the right direction!
I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!