Title: Global Meta Box Order
Author: nosurs
Published: <strong>March 28, 2015</strong>
Last modified: December 2, 2015

---

Search plugins

![](https://ps.w.org/global-meta-box-order/assets/banner-772x250.png?rev=1122758)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/global-meta-box-order_1f3744.svg)

# Global Meta Box Order

 By [nosurs](https://profiles.wordpress.org/nosurs/)

[Download](https://downloads.wordpress.org/plugin/global-meta-box-order.zip)

 * [Details](https://wordpress.org/plugins/global-meta-box-order/#description)
 * [Reviews](https://wordpress.org/plugins/global-meta-box-order/#reviews)
 * [Development](https://wordpress.org/plugins/global-meta-box-order/#developers)

 [Support](https://wordpress.org/support/plugin/global-meta-box-order/)

## Description

Intuitively harmonize meta box positions and screen column layout for all backend
users of your WordPress installation.

#### Quick Overview

 * Install and activate the plugin
 * Switch to a post, a page, a custom post type, or the dashboard
 * Change the order and position of a meta box (or all of them)
 * Change the column layout
 * Switch to a different user (maybe with the help of the [_User Switching_](https://wordpress.org/plugins/user-switching/)
   plugin)
 * See your changes applied

#### Installation

Download and unpack, then move the folder ‘global-meta-box-order’ into your ‘plugins’
folder. Head over to your WordPress installation and activate the plugin in the 
admin area.

#### Rollback

The plugin doesn’t write anything to the database, it just reads. So it never touches
any user settings, but instead filters them on a per request basis. Though all applied
changes _appear_ to be permanent from a user’s perspective, they are not. Just deactivate
the plugin and see all changes disappear. Activate it again, and they will all be
reapplied.

#### How It Works

The plugin operates on a blueprint user whose screen settings for meta boxes (visibility,
position and ordering), and column layout are cloned for all other backend users
on the fly.

By default, this blueprint user is the first admin user found, so you’ll need to
be logged in as **that user** to globally change screen settings. For how to change
the default blueprint user as well as other settings, please refer to the _Configuration_
section below.

#### Where It Works

By default, the plugin kicks in when a user:

 * edits a post
 * edits a page
 * edits a custom post type
 * hits the dashboard

#### What It Changes

It will always change

 * the meta boxes visibility, ordering, and column positions
 * the column layout

When told so, it will also

 * remove the screen options box
 * immobilize all boxes, so they can’t be moved around by your users anymore

#### Usage

Log in as your blueprint user. By default, the is the first admin user found in 
your system.

Select an editing screen (post, page, custom post type) or the dashboard, move the
meta boxes around, change their screen settings and the screen’s column layout. 
Switch to some user to review your settings, switch back to adjust them.

When done, you might want to lock your views down by removing the screen options
box and by locking the boxes’ sort order. Your blueprint user, of course, wil not
be affected by this.

#### Configuration

The backend integration is kept to a minimum. No navigation entry, no options page,
no entry in the database. Instead, the place to go to configure the plugin is your
theme’s _functions.php_.

By the way: You don’t _need_ to configure the plugin. As long as it finds an admin
user, it will work just fine.

**Preparation**

Fire up an editor, load your _functions.php_, and copy and paste the following code
into it. The idea is to have some sort of container to do the configuration in, 
but do it any way you like.

For brevity, we’ll assume the plugin is loaded and active, so we won’t check for
that (see this nice [write-up](http://queryloop.com/how-to-detect-if-a-wordpress-plugin-is-active/)
on _QueryLoop_ on some ways to do it, though).

    ```
    if (is_admin()) {

        // The path to the configuation is rather long, so let's
        // make us a shorthand.
        class_alias('\GlobalMetaBoxOrder\Config', 'MetaBoxConfig');

        // Add MetaBoxConfig below this line
        ...
    }
    ```

Now we are ready to add some of the configuration settings below to adjust the plugin’s
default behaviour. You might also want to have a look at the example configuration
near the end of this document.

Please keep in mind that you need to be logged in as any user but your blueprint
user to see a setting applied. Again, the [_User Switching_](https://wordpress.org/plugins/user-switching/)
plugin might come in handy.

**Screens To Operate On**

By default, the plugin operates on the post, page, and custom post type editing 
screens, and the dashboard.

You can change this as follows:

    ```
    // Operate on post and page screens only, leave the dashboard alone.
    // This will still include custom post types.
    MetaBoxConfig::$filter = array('post', 'page');

    // Exclude custom post types
    MetaBoxConfig::$include_cpts = false; 

    // Allow custom post types...
    MetaBoxConfig::$include_cpts = true; 

    // ...but not all of them
    MetaBoxConfig::$exclude = array('acme_product');
    ```

_MetaBoxConfig_ in the example above is assumed to be an alias to _\GlobalMetaBoxOrder\
Config_ as shown in the preparation section above.

**Changing the Blueprint User**

Register a function that returns a user id, like so:

    ```
    MetaBoxConfig::$getBlueprintUserId = function () { return 1; };
    ```

Or, more involved:

    ```
    MetaBoxConfig::$getBlueprintUserId = function () { 

        $user = get_user_by('slug', 'jane');
        return $user ? $user->ID : false; 
    };
    ```

_MetaBoxConfig_ in the example above is assumed to be an alias to _\GlobalMetaBoxOrder\
Config_ as shown in the preparation section above.

**Locking Views**

By default, all users will be able to interact with the screen options box, and 
to move around the meta boxes themselves. There is a rationale behind it, but to
cut things short, this is how you might want to change it:

    ```
    // No screen options 
    MetaBoxConfig::$remove_screen_options = true;

    // Meta boxes can't be moved anymore 
    MetaBoxConfig::$lock_meta_box_order = true; 
    ```

_MetaBoxConfig_ in the example above is assumed to be an alias to _\GlobalMetaBoxOrder\
Config_ as shown in the preparation section above.

**Example Configuration**

    ```
    if (is_admin()) {

        // Make sure plugin is active
        if (class_exists('\GlobalMetaBoxOrder\Config')) {

            // Make a long name short. 
            class_alias('\GlobalMetaBoxOrder\Config', 'MetaBoxConfig');

            // Settings

            MetaBoxConfig::$filter = array('post', 'page', 'dashboard'); // default
            MetaBoxConfig::$include_cpts = true; // default
            MetaBoxConfig::$getBlueprintUserId = function () { return 1; };
            MetaBoxConfig::$exclude = array('acme_product');
            MetaBoxConfig::$remove_screen_options = true;
            MetaBoxConfig::$lock_meta_box_order = true; 
        }
    }
    ```

#### On Moving the WYSIWYG Editor

The position of WordPress’ WYSIWYG editor is fixed, and can’t be changed out of 
the box (mostly because it lacks a box around it). There are reasons for this, but
if you want to have a positionable editor anyway, you might want to have a look 
at our very own [_Movable Editor_](https://github.com/pontycode/wordpress-movable-editor)
plugin.

If, on the other hand, if you want to place one specific box _above_ the editor,
you might want to check out [this answer](http://wordpress.stackexchange.com/a/88103)
on _stackexchange_.

## Screenshots

[⌊A post editing screen with all sorts of meta boxes turned on. A somewhat cluttered
view, potentially distracting your editors, and overwhelming new users.⌉⌊A post 
editing screen with all sorts of meta boxes turned on. A somewhat cluttered view,
potentially distracting your editors, and overwhelming new users.⌉[

A post editing screen with all sorts of meta boxes turned on. A somewhat cluttered
view, potentially distracting your editors, and overwhelming new users.

[⌊An uncluttered view, leaving only those meta boxes turned on your users might 
need for their work. Also, the order of the meta boxes has changed a bit to improve
your editors workflow.⌉⌊An uncluttered view, leaving only those meta boxes turned
on your users might need for their work. Also, the order of the meta boxes has changed
a bit to improve your editors workflow.⌉[

An uncluttered view, leaving only those meta boxes turned on your users might need
for their work. Also, the order of the meta boxes has changed a bit to improve your
editors workflow.

[⌊The new uncluttered view gets applied to all of your users, so they only see the
meta boxes they need to see, in the order you define.⌉⌊The new uncluttered view 
gets applied to all of your users, so they only see the meta boxes they need to 
see, in the order you define.⌉[

The new uncluttered view gets applied to all of your users, so they only see the
meta boxes they need to see, in the order you define.

## Reviews

![](https://secure.gravatar.com/avatar/a9d646ded1198e4fa9316919e07542d1260d6cee66c3b502fa497e8e5880e5b4?
s=60&d=retro&r=g)

### 󠀁[Amazing !](https://wordpress.org/support/topic/amazing-1636/)󠁿

 [lehezee](https://profiles.wordpress.org/lehezee/) December 1, 2017

This is exactly what i needed, thanks you !

![](https://secure.gravatar.com/avatar/2ee976b62c073d8c35c7cab44874f84fcab79d43b58f90002256b741bff35079?
s=60&d=retro&r=g)

### 󠀁[Nice and simple](https://wordpress.org/support/topic/nice-and-simple-131/)󠁿

 [shottogan](https://profiles.wordpress.org/shottogan/) September 3, 2016

Easy way to customize post editors for all users~

![](https://secure.gravatar.com/avatar/95377293a87943ab05d9fa8628bab10b93b13dca63fe3bf1a02ccbe335db4dc3?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-3199/)󠁿

 [radgh](https://profiles.wordpress.org/radgh/) September 3, 2016

Got it working in no time. Locked meta boxes and hid the screen options button. 
Hopefully I’ve just made the client’s life 10x easier by arranging meta boxes in
a logical order. Why WordPress doesn’t let you set the default layout out of the
box is beyond me.

![](https://secure.gravatar.com/avatar/4d2d9964fb3ed5d2287d79fe91e72fc7ad9037dcca9ee4b26ee615f3bdec37dc?
s=60&d=retro&r=g)

### 󠀁[A great plugin to restore order!](https://wordpress.org/support/topic/a-great-plugin-to-restore-order/)󠁿

 [buylov](https://profiles.wordpress.org/buylov/) September 3, 2016

Thanks to the author! The plugin works great. If you read the thoughts out of my
head.

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/)

## Contributors & Developers

“Global Meta Box Order” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ nosurs ](https://profiles.wordpress.org/nosurs/)

[Translate “Global Meta Box Order” into your language.](https://translate.wordpress.org/projects/wp-plugins/global-meta-box-order)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/global-meta-box-order/),
check out the [SVN repository](https://plugins.svn.wordpress.org/global-meta-box-order/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/global-meta-box-order/)
by [RSS](https://plugins.trac.wordpress.org/log/global-meta-box-order/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.3

 * Check for AJAX requests

## Meta

 *  Version **1.0.3**
 *  Last updated **11 years ago**
 *  Active installations **300+**
 *  WordPress version ** 4.1 or higher **
 *  Tested up to **4.3.34**
 * Tags
 * [admin](https://wordpress.org/plugins/tags/admin/)[custom](https://wordpress.org/plugins/tags/custom/)
   [customization](https://wordpress.org/plugins/tags/customization/)[customize](https://wordpress.org/plugins/tags/customize/)
   [post](https://wordpress.org/plugins/tags/post/)
 *  [Advanced View](https://wordpress.org/plugins/global-meta-box-order/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  5 5-star reviews     ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/global-meta-box-order/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/global-meta-box-order/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/global-meta-box-order/reviews/)

## Contributors

 *   [ nosurs ](https://profiles.wordpress.org/nosurs/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/global-meta-box-order/)