要通过代码自定义wordpress后台登录页面,这个看起来简单,但做起来还是有点小复杂。据了解,高时银博客就是通过以下2步来实现的:1、在当前主题文件夹下创建一个login.css 文件,html{ background: transparent;}body.login{ background: #000 url("images/login_bg.jpg") no-repeat center top;}body.login div#login h1 a { display: none;}body.login div#login h1{ display: block; height: 70px;}.login form,.login form .input, .login input[type="text"],.wp-core-ui .button-primary,.wp-core-ui .button-primary:hover{ -webkit-box-shadow:none; box-shadow:none; -webkit-border-radius: 0; border-radius: 0;}.login form{ background: rgba(10,35,35,.4); border: none;}.login form .input, .login input[type="text"]{ background: transparent; border-color: #444; color: #eee;}.login form .input:focus{ border-color: #666;}.login label{ color: #999; line-height: 35px;} .wp-core-ui .button.button-primary{ background: rgba(187,64,48,.7); border: none; line-height: 12px; padding: 10px 30px;}.wp-core-ui .button-primary:hover{ background: rgba(0,0,0,.4); -webkit-transition: background 0.5s ease-out 0s; -moz-transition: background 0.5s ease-out 0s; -ms-transition: background 0.5s ease-out 0s; -o-transition: background 0.5s ease-out 0s; transition: background 0.5s ease-out 0s;}.wp-core-ui .button.button-primary,.login label,.login form .input{ font-family: 'Microsoft YaHei';}#nav,#backtoblog{ display: none;}2、然后在主题的functions.php文件中添加调用这个CSS文件的代码://登录界面function diy_login_page() { echo '<link rel="stylesheet" href="' . get_bloginfo( 'template_directory' ) . '/login.css" type="text/css" media="all" />' . "\n";}add_action( 'login_enqueue_scripts', 'diy_login_page' );希望我的回答帮到了我哦。