X

Move author metabox / options to publish post metabox

WP Mail SMTP Review

Adding this snippet to the functions.php of your wordpress theme will move the author metabox from the bottom of the page into the publish post metabox.



Code Snippet:


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

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!