![]() Why? Remember we set that parameter to 5 when we disable Gutenberg, so by setting it to 10 or any value greater than 5, we easily override the disabling function and thereby enable Gutenberg. Tip: Notice the 10 value that these techniques are passing via the add_filter hooks. However you choose to disable Gutenberg, you will need to do so in order for the following techniques to work properly. ![]() Or, if you would rather disable Gutenberg and restore the Classic Editor using a plugin, check out Disable Gutenberg, which is super lightweight, flexible, and easy to customize exactly where Gutenberg should be disabled on your site. So choose either or both of these hooks (to support all versions of WP), and add to your theme’s functions.php. Since most browsers cannot support or run ES6 and. To do this, we can use either of the following filter hooks (depending on WP version): // WP = 5.0Īdd_filter('use_block_editor_for_post', '_return_false', 5) We will learn about how to create a Custom Gutenberg block using ES6, JSX and wordpress/scripts package. Gutenberg Was Rolled into WordPress 5.0 as the Default Content Editor. It’s also incredibly useful for developers and those who work with clients to know what’s on the horizon for the block editor. ![]() Otherwise, if you want to enable Gutenberg only on specific post IDs, post types, and so forth, you will need to first disable Gutenberg everywhere. Running the Gutenberg plugin is a great way to get the latest new features of the WordPress block editor. So if you want to enable Gutenberg everywhere, you don’t need to do anything: it just works. In WordPress 5.0 and beyond, Gutenberg is enabled by default. My free plugin Disable Gutenberg now provides whitelist options to always use Block Editor on any post IDs, slugs, or titles :) First: Disable Gutenberg by default Update! To selectively enable Gutenberg only on certain posts, you can do it without touching any code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |