Home / admin / Move author metabox / options to publish post metabox
  • How to Move author metabox / options to publish post metabox

    move-author-metabox-options-to-publish-post-metabox

    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.

    ( click code to copy )

    wordpress snippet : PHP

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

    ( WordPress codex functions, hooks, in this snippet. )

    admin_menu, get_post, remove_meta_box, add_action,
  • zeb

    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.

    • 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.

      • zeb

        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.

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

  • 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.

  • efromdc

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

  • efromdc

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

  • efromdc

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

  • efromdc

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

  • efromdc

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

  • efromdc

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