Skip to content

How To Move Author Metabox To Publish Metabox In WordPress

It’s really annoying that whenever you have to change the author of your post in WordPress, you have to scroll down to the author metabox, then you’ll have to return back to the top to publish the post. So we are going to move author metabox to publish metabox with a simple snippet, which makes it more easy for you to change post author right from the publish.

Just copy and past the following code into your functions.php file:

// MOVE THE AUTHOR METABOX INTO THE PUBLISH METABOX
add_action( 'admin_menu', 'remove_author_metabox' );
add_action( 'post_submitbox_misc_actions', 'move_author_to_publish_metabox' );
function remove_author_metabox() {
    remove_meta_box( 'authordiv', 'post', 'normal' );
}
function move_author_to_publish_metabox() {
    global $post_ID;
    $post = get_post( $post_ID );
    echo '<div id="author" class="misc-pub-section" style="border-top-style:solid; border-top-width:1px; border-top-color:#EEEEEE; border-bottom-width:0px;">Author: ';
    post_author_meta_box( $post );
    echo '</div>';
}

Leave a Reply

Your email address will not be published. Required fields are marked *