How can I put a custom meta box above the editor but below the title section on the edit post page?

  • 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']);
    });
    

Leave a Comment