云端网 - www.ydw.org
有网友提问,由于他的是多作者网站,发布文章时经常要修改作者,在的文章编辑页面,要把页面下拉到底部才能修改作者,有点麻烦,能不能把作者模块移到右上角的发布模块中,更方便点击。
要满足这个需求,其实一点都不麻烦,只需要把作者模块拖到右上角即可。
如果你一定要把作者这个下拉框挪到发布模块下,如下图所示:
== 原始状态 ==
== 把作者挪到发布模块 ==
那就在你的当前主题目录下的.php中添加以下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 ''; }
原文链接:
(云端网 )
www.ydw.org - 云端网