How to Move Meta Boxes With WordPress
Meta boxes exist in the content editing screens within the WordPress dashboard. You can move them around to your liking and make blogging more efficient by having all your most-used tools at the top. Some themes add meta boxes, and many plugins also add meta boxes. These boxes hold extra data about your content, such as the Web address of a podcast or the price of a product. You can change the position of meta boxes either by dragging and dropping them or by editing their code.
Instructions
-
Move Meta Boxes in the Dashboard
-
1
Log in to the WordPress dashboard by navigating to the "wp-admin" directory of your website. If you installed WordPress in a directory called "blog," then you would find the "wp-admin" directory at "http://yoursite.com/blog/wp-admin/."
-
2
Navigate to "Posts" from the left-hand menu in the WordPress dashboard. Click on the title of a post you wish to edit or click the "Add New" button at the top of the screen to create a new post.
-
-
3
Click on the gray heading bar at the top of any module on the "Edit Post" screen. In WordPress, a module is any box like "Publish," "Featured Image" or "Post Tags." Modules and meta boxes are the same thing, since meta boxes save extra information about the post.
-
4
Drag the module while your mouse pointer is still holding the gray title bar. Move it to wherever you like on the screen. The only box you cannot move is the main editor box, and you cannot place anything above the editor, either. The menu is also not moveable as it is not a module.
Move Meta Boxes Programmatically
-
5
Log in to the WordPress dashboard by navigating to the "wp-admin" directory of your website.
-
6
Navigate to the "Edit Themes" screen by clicking "Appearance" in the left-hand menu and then clicking the "Editor" link that appears below "Appearance." Locate your "functions.php" file under the "Templates" heading on the right side of the "Edit Themes" screen and click its link.
-
7
Locate the following line of code, which you may find in multiple places in your file:
add_meta_box('mymeta', 'My Meta Box', 'my_meta_box', 'post', 'normal', 'default');
The last two parameters -- parameters match with predefined variables and pass their values in to functions in computer programming -- in the above example specify the position of the meta box. Change "normal" -- the "context" or placement for this particular meta box -- to "side" or "advanced" to move the box to the side of the text editor or allow users to drag and drop the meta box to any position.
-
8
Change "default" -- the "priority" parameter for "add_meta_box()" -- to "high," "core" or "low." Both "high" and "core" place the meta box at the top of all others in their portion of the screen, such as right below the editor box for a "normal" context or above the "Publish" box for the "side" context.
-
1
Tips & Warnings
When you drag and drop a meta box in to a new position, the next time you visit that editing screen, the meta box will retain its placement from your last use.
When placing the meta boxes programmatically, consider which meta boxes the user will use the most and try to put those at the top.
Back up all theme files before editing them. If you encounter a "white screen" error do to a mistake in PHP code, you can get back in to WordPress by re-uploading the original theme files.