Reset positions of metaboxes in admin

I am writing a theme and in it I have a function which creates two metaboxes. The forth parameter of the “add_meta_box()” function I used can be set to ( high, core, default or low). I want the boxes to appear in a particular order ( ie order within one of these 4 groups – eg with both metaboxes being set to ‘priority’ I would like to be able to determine which was displayed first and which second).

That is the back story, but my question derives from the fact that while experimenting with this I must have moved one of the boxes to another column; and that action seemingly overrides the priority in the programming altogether ( I know this because when I rename the metaboxes I have programmatic control again) . I have tried everything to get it back to default but to no avail. Can anyone help ?

1
1

In you PhpMyAdmin query for: (if you have a different database prefix, change that in the query, also change the user_id to yours)

SELECT * 
FROM  `wp_usermeta` 
WHERE  `user_id` =1
AND  `meta_key` LIKE  'meta-box%'

Than delete those values and you will get the original order back. If you only want to change the menu order back for a page than only delete “meta-box-order_page”.

Leave a Comment