Is It Possible to Use the Gutenberg Block Editor With Custom Fields in a Custom

[ad_1]

Hi Samuel,
If you want to do something when a custom field is saved, you should hook into the process that actually saves the field into the postmeta table. There are a number of possible hooks. Checkout the source code for update_metadata(). Blocks of red comment text precede each hook, so they are easy to find within the source code.

You should be able to use the block editor in other UI elements. I’m not so sure you can alter the default custom fields meta box, but you could create your own meta box that utilizes the block editor. I’m not sure how you would actually do so, but I’m confident it’s possible.

Enabling the block editor here in the forums is accomplished with the Blocks Everywhere plugin. It’s meant specifically for this projectdmc.org site, but maybe you can gain insight into what’s involved by examining the source code.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer