Is it fundamentally possible to create a custom area through Customizer that would allow adding Gutenberg blocks. Similar to a widget area but one that can be managed through Customizer panes and allow for Gutenberg blocks instead of widgets.

The user case I am thinking of is have the ability to add CTA buttons, and icon links to the site navbar area within a custom theme. I am aware I can ad a new sidebar and add widgets to it which would render in my navbar, however I hate the contextual disconnect of adding a "sidebar" that is not an actual sidebar. More importantly I want to be able to leverage our design system elements that will already be available as Gutenberg blocks.

As compromise I have added a simple input field in my Customizer settings that I can ad shortcodes to that will render using the do_shortcode function in my header template file, however I have yet to find a intuitive way to make Gutenberg blocks available as shortcodes.

  • This is all in the long-term plans for Gutenberg, but you'd need to do some pretty hefty custom coding to make it happen before it gets built out for Core. You may want to wait until later this year when it's set to be addressed. wptavern.com/… – WebElaine Mar 25 at 15:47
  • We have to wait at least for documentation of existing features. It's not not enough as of today... – Max Yudin Mar 25 at 17:01
  • Thank you for the feedback! As always I'm always just enough ahead of the curve to make things super difficult. Cheers! – greedesign Mar 25 at 17:36
  • It might not be exactly what you're looking for but it's pretty close... Check out the gridd theme: github.com/wplemon/gridd you can add reusable blocks anywhere on your page via the customizer. So first you create a reusable block with your content in Gutenberg, then you can place them wherever – Aristeides Mar 25 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.