I have a custom meta box for a custom post type that my client wants placed between the title/permalink section and the post editor in the admin panel. Is this possible and if so is there a hook/filter/etc that I would need to use?
- Simply add a meta box using the advanced context, and high priority
- Then, latch on to the
edit_form_after_title
hook -
Print your meta boxes out there, then remove it so it doesn’t appear twice.
// Move all "advanced" metaboxes above the default editor add_action('edit_form_after_title', function() { global $post, $wp_meta_boxes; do_meta_boxes(get_current_screen(), 'advanced', $post); unset($wp_meta_boxes[get_post_type($post)]['advanced']); });