How to hide the Gutenberg Banner from your child sites

remove gutenberg banner

WordPress 4.9.8 release, scheduled for July 31, 2018, will include a banner inviting website owners to try the new Gutenberg editing experience. This banner shows for all users with the back end access and each user needs to dismiss it individually.

Guntenberg Banner

Hiding this banner on multiple sites can take you some time, however, MainWP Code Snippets Extension can come handy and save you some time. With the following snippet, you can hide the banner directly from your dashboard and hide it for all users.

Code for removing Gutenberg Invite Banner

Add the following information to your Code Snippets Extension and then run the snippet. If you haven’t used the Code Snippet Extension before the following help docs will walk you through the steps: Save a Code Snippet and Execute a Code Snippet

Snippet Title: Remove Gutenberg Banner (WP 4.9.8)

Snippet Description: A custom snippet that will hide the Gutenberg banner from the WP 4.9.8 Dashboard page.

Snippet Type: This Code Snippet only returns information from Child Site

Snippet Code (test on a dev site before deploying to your network):

<?php
$users = get_users( array( 'fields' => array( 'ID' ), 'number' => 100 ) );
  foreach( $users as $user ) {
    if ( $user ) {
      update_user_meta( $user->ID, 'show_try_gutenberg_panel', 0 );
    }
  }
?>

Your Snippet should look like the image below before you “Run the Snippet”

Remove gutenberg banner

Important note: in our example, we set the snippet to hide the banner for 100 users (100 user accounts on the child site(s)), however, if you have more accounts, you can change the number in the snippet. On sites with a large number of user accounts, please note that the process can timeout or overload the server.

Code for adding back the Gutenberg Invite Banner (reversing removal)

The process is reversible, so if needed, you can simply reverse it by tweaking the snippet to:

<?php
$users = get_users( array( 'fields' => array( 'ID' ), 'number' => 100 ) );
  foreach( $users as $user ) {
    if ( $user ) {
      update_user_meta( $user->ID, 'show_try_gutenberg_panel', 1 );
    }
  }
?>

1 thought on “How to hide the Gutenberg Banner from your child sites”

  1. Great post, thanks. Perhaps you could share a similar post on installing the classic editor plugin (and setting the option to entirely replace Gutenberg) on all sites.

    https://wordpress.org/plugins/classic-editor/

Comments are closed.

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.