Move Publish Metabox (#submitdiv)
-
Hello Everyone,
I am trying to better understand how sortable metaboxes work in WordPress, particularly for custom post types. By default the metabox are sortable and draggable by the user.
I am looking for a way to move the “Publish” metabox (#submitdiv) to the end of my custom post type page. How can I interact with the metaboxes to prevent them from being sortable and ensure that the “Publish” metabox appears at the very bottom of the page? Is it handled in javascript or PHP ? Are the user preferences stored in some way ?
I tried this code : the firstremove_meta_box
works, butadd_meta_box
always places the #submitdiv in the same spot, no matter the given values.function reorder_meta_boxes() {
remove_meta_box('submitdiv', 'artisans', 'side');
add_meta_box( 'submitdiv', __('Save'), 'post_submit_meta_box', 'artisans', 'advanced', 'low' );
}
add_action('admin_init', 'reorder_meta_boxes');
Any documentation or ideas are welcomed,
Thank you for your help!
- You must be logged in to reply to this topic.