The Master Bar provided by WordPress.com

How to easily disable the WordPress.com toolbar

Sites hosted on WordPress.com get this toolbar at the top, called Master Bar, that replaces the traditional Admin Bar provided by WordPress, with handy access to your sites, so you can manage posts, pages, comments, and other areas of your website.

The Master Bar provided by WordPress.com

I think the WordPress.com toolbar is fine in 99% of the cases. The WordPress.com team makes a great job delivering useful decisions, rather than a plethora of options, to their users, and these are well thought decisions to empower the users to get the most of their sites. However, I like to have the option to edit a post or page quickly without having to look for an Edit link in the content body, and the WordPress.com toolbar removes this link, leaving only one to add a new post.

The other thing I prefer from WordPress.org Admin Bar, is that you always have Jetpack Stats visible on it, and you can quickly click and jump to them.

Finally, some plugins output useful information here, for example, Query Monitor, which is very useful while developing the site.

Remove the WordPress.com toolbar

Please note that in order to be able to do this, you need to have at least a Business plan in WordPress.com. That plan allows you to upload plugins which is what we’ll create here. I created a folder named disable-masterbar in my computer, and inside it, I created a file named disable-masterbar.php where I wrote this snippet to disable the WordPress.com Master Bar. Then I compressed the folder to a disable-masterbar.zip file:

/**
 * Plugin Name: Disable Master Bar
 * Plugin URI: https://startfunction.com/how-to-disable-the-wordpress-com-toolbar/
 * Description: Disable WordPress.com Master Bar
 * Author: Elio Rivero
 * Version: 0.0.7
 * Author URI: https://startfunction.com
 * License: GPL2
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

/**
 * Filter the Jetpack module list and remove WordPress.com MasterBar.
 * 
 * @param array $modules Collection of Jetpack modules.
 * 
 * @return array
 */
function startfunction_no_masterbar ( $modules ) {
    if ( isset( $modules['masterbar'] ) ) {
      unset( $modules['masterbar'] );
    }
    return $modules;
}    
add_filter( 'jetpack_get_available_modules', 'startfunction_no_masterbar' );

This uses a filter provided by Jetpack, that powers WordPress.com behind the scenes. That filter allows us to modify the list of modules available to exclude the Master Bar.

Then in WordPress.com, I went and selected my site, then clicked on Tools > Plugins in the sidebar, and finally clicked on the Install Plugin button

Uploaded the zip file for my plugin, activated it and now the WordPress.com toolbar is gone, and I have the traditional WordPress.org toolbar back in its place.

The Admin Bar provided by WordPress.org

Honestly, if the WordPress.com toolbar included a link to edit the current page or post, I wouldn’t disable it because I find it useful to quickly access the WordPress.com admin and manage my different sites.

Hope it’s useful for you and if you use it, let me know in the comments!

Leave a Reply