The block editor, also known as Gutenberg editor, contains a welcome guide for new users to explain the main functionality of itself. Most people working on a daily base with the block editor know how to use it, which makes the welcome guide unnecessary for them. Since the welcome guide is displayed on every new website, even if the same multisite, and since quite some time even in widgets or the widget area in the Customizer, it’s annoying for quite a large amount of people.

Welcome Guide in the block editor
Welcome Guide in the block editor
Welcome Guide in widgets
Welcome Guide in widgets
Welcome Guide in the Customizer
Welcome Guide in the Customizer

If you’re one of them, you can disable it with the following function:

/** * Disable welcome guides in Gutenberg. */ function my_disable_welcome_guides() { wp_add_inline_script( 'wp-data', "window.onload = function() { const selectPost = wp.data.select( 'core/edit-post' ); const selectPreferences = wp.data.select( 'core/preferences' ); const isFullscreenMode = selectPost.isFeatureActive( 'fullscreenMode' ); const isWelcomeGuidePost = selectPost.isFeatureActive( 'welcomeGuide' ); const isWelcomeGuideWidget = selectPreferences.get( 'core/edit-widgets', 'welcomeGuide' ); if ( isWelcomeGuideWidget ) { wp.data.dispatch( 'core/preferences' ).toggle( 'core/edit-widgets', 'welcomeGuide' ); } if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } if ( isWelcomeGuidePost ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' ); } }" ); } add_action( 'enqueue_block_editor_assets', 'my_disable_welcome_guides', 20 );
Code language: PHP (php)

Before WordPress 6.0, this one was working:

/** * Disable welcome guides in Gutenberg. */ function my_disable_welcome_guides() { wp_add_inline_script( 'wp-data', "window.onload = function() { const isWelcomeGuidePost = wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ); const customizeWidgetsSelect = wp.data.select( 'core/edit-widgets' ); let isWelcomeGuideCustomizer; if ( customizeWidgetsSelect ) { isWelcomeGuideCustomizer = customizeWidgetsSelect.__unstableIsFeatureActive( 'welcomeGuide' ); if ( isWelcomeGuideCustomizer ) { wp.data.dispatch( 'core/edit-widgets' ).__unstableToggleFeature( 'welcomeGuide' ); } } if ( isWelcomeGuidePost ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' ); } }" ); } add_action( 'enqueue_block_editor_assets', 'my_disable_welcome_guides', 20 );
Code language: PHP (php)

Add this function to your functions.php of your (child) theme and the welcome guide is gone. It can still be manually displayed by using the three dots in the upper right corner of the block editor.

The code adds a small inline JavaScript snippet, that checks if the welcome guide is enabled while loading the block editor. If so, it disables the guide. It may happen that it flashes for a short amount of time before it gets disabled.

Leave a Reply

Your email address will not be published. Required fields are marked *