How to Move Meta Boxes With WordPress

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 ''
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.


0 Responses to "How to Move Meta Boxes With WordPress"

Post a Comment

Popular Posts