1

I can't believe that I can't find anything about this topic somewhere on the internet. Or maybe I just overlooked this option: How do I use Gutenberg Blocks in my widget? For example the "button" block or the new "social icons" block.

2

1 Answer 1

1

Marc,

If you install the Gutenberg plugin (as of v 8.9.0 of Gutenberg), which is the newest version of the block editor or are using Wordpress 5.8 or newer; the widget editor has become block-based by default.

Below is my original answer from May 2020 but is useful for posterity.

There's a couple issues going on:

  • How 'widgets' are thought (and will be) of in Gutenberg and WordPress (in the future) is different than how it's been used in the past within WordPress.

WordPress has traditionally thought of widgets to be self-contained snippets of code outside of the post_content area (post content area = the large area typically in the center of the screen where you enter content for your posts and pages that is usually unique for every page). https://wordpress.org/support/article/wordpress-widgets/ is a great example of how WordPress documentation describes widgets to be located outside of the post_content/main-editor area.

  • Widgets in Gutenberg are being used to describe content that is sort of self-contained (a list of latest posts, recent comments, social icons, etc) and are only able to be used in the post_content/main editing area - for now.

As for using Gutenberg blocks in the traditional sense of 'widgets' - displaying content outside of the post_content/editor area like how you would edit them through https://nameofyoursite.com/wp-admin/widgets.php - is still really, really limited and not yet completely functional. This type of editing is being referred to as 'full site editing' in Gutenberg.

I honestly recommend wouldn't recommend using the full site editing (at this moment) unless you're willing to invest a lot of time and expect things to quickly change and break, and be very comfortable with using the github tracker, expect very little documentation on it. To enable the full site editing, you have to install the gutenberg plugin and then there's some additional settings to configure (but I can't find them in the most).

For anyone else reading this, full site editing, I think is coming out publicly (or by default) later in 2020.

As an alternative, you could sign up for https://make.wordpress.org/core/2020/05/01/an-experimental-outreach-project-for-full-site-editing/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.