I know how to remove meta boxes from dashboard, also how to add new ones, but is there a method that allows to rearrange them, for example move from side
position to normal
with use of functions.php or a plugin?
I know that it would require to fire only once somehow, to allow user to rearrange elements in the future, but in that case, it might just do it every time it loads – elements on dashboard are limited and functionality to rearrange them can be disabled completely.
add_meta_box
has a the following placement parameters:For
$context
the difference between normal and advanced is that normal will be placed on the page before advanced.The
$priority
determines the hierarchy but is overridden when dragged by the user. You can disable the drag and drop functionality.Furthermore
do_meta_boxes
can be used to place (output) the registered meta box, for example if you want to place the meta box above the WYSIWYG editor you can use it in a function which firesedit_form_after_title
.If you only want to run an action once you can some trickery with
did_action
, for example:http://codex.wordpress.org/Function_Reference/do_meta_boxes
http://codex.wordpress.org/Function_Reference/did_action