How to activate or deactivate the full screen of the WordPress block editor

full screen mode

Whether you like to use the block editor with full screen or not, it is important to know how to change from one mode to another because who knows if tomorrow you will have to use a client’s website and will want you to change it, or on the contrary, that you don’t change it but you want to change it while you are editing.

How to enable or disable the full screen of the WordPress block editor for your user

In case you didn’t know, you can easily turn on or off the full screen of the block editor.

Just click on the upper right side of the editor, on the “Options” icon, and there you will find the option to activate or deactivate it.

As you can see it is very easy, problem? That you do not activate or deactivate it for all users, only for your user, and WordPress will remember your setting and the next time you open the editor it will show it or not. So far so good, right?

But what if I want the full screen to be on or off for everyone?

How to enable or disable the full screen of the WordPress block editor for all users

If you want the full screen simply not available to any user … well you can also do it.

With a simple code

A beautiful code, added to your utility plugin or functions.php file of the active theme solves this problem, this one:

function wphelp_deactivate_fullscreen_Mode_block_editor() { $script = "window.onload = function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } }"; wp_add_inline_script( 'wp-blocks', $script ); } add_action( 'enqueue_block_editor_assets', 'wphelp_deactivate_fullscreen_Mode_block_editor' );
Code language: PHP (php)

Once you save the changes in your plugin or function file I mentioned above, by default the block editor will have the full screen mode disabled.

A user arrives and activates it? nothing happens, next time you will find it deactivated again.

With a plugin

If you prefer to stay within the “plugin territory” there is also a solution. Here are a couple of rich plugins that serve precisely what we are talking about …

Both work the same way, you install it, turn it on and off by default the full screen of the WordPress block editor.

Read this post in Spanish: Cómo activar o desactivar la pantalla completa del editor de bloques de WordPress

Click to rate this post!
[Total: 1 Average: 5]

Leave a Comment

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

Scroll to Top Skip to content