X

How to Move Author Metabox to Publish Post Metabox

Snippets by IsItWP

Want to move your author metabox from the bottom of the page to the publish post metabox.? This comes in handy if you’re running a multi-author blog and are publishing most of your articles as Editorial Team. That way you can easily change the author without having to scroll down for the author metabox. This snippet also reminds you to change the author before publishing the article.

Instructions:

All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:

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>';
}

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: Best WordPress Page Builders (Compared).

Comments   Leave a Reply

  1. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  2. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  3. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  4. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  5. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  6. Got a way to open all publish metabos options by default so status, visibility and publish date are completely viewable by default?

  7. TourKick, Clifford P August 2, 2012 at 1:19 pm

    Hi Kevin. I tried this snippet and the author box displays in the metabox as intended, but when I save, it doesn’t ‘stick’. Maybe it’s conflicting with another plugin or function, maybe not. Just wanted to report that.

  8. thanks for the snippet. However, I tried this snippet on a multisite test site and discovered that all authors in the WP site are also included in the drop downmenu, when moved to the publish post metabox. However, I may select any author name I like but do not have permission to publish anything. Just can save a post.

    1. Hi Zeb,
      I never tested this out on wpmu but it works great within single user wordpress version. Saves time rather then scrolling to the bottom of the page. However that it good to know that it will not work properly on MU.

      1. Yes, Kevin thats why I liked it and tried to implement it to save time. It’s great and I’ll definitly use it in my single installation (thanks to you) 🙂 , but in MU, I have to wait for an improved version.

        1. Hi Zeb agreed, I’m sure ill post an update in the near future.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!