以前小雨分享过一款猫头鹰的后台登陆界面,今天就继续给大家详细分解下各个部位的个性化设置,好让小伙伴可以有需选择:
先来看下效果图对比,
默认的 wordpress 后台登陆界面,丑爆了!
改造后的 wordpress 后台登陆界面,屌爆了!有木有!
下面来逐一的替换吧:
//去登录界面的默认图片 function custom_loginlogo() { echo '<style type="text/css"> h1 a {background-image: url('.get_bloginfo('template_directory').'/images/logo.png) !important;background-size: 265px !important;width:265px !important; } </style>'; } add_action('login_head', 'custom_loginlogo'); // 修改默认登录界面的 LOGO 的链接地址为自己网站的地址 function custom_loginlogo_url($url) { return'https://dedewp.com/'; //在此输入你需要链接到的 URL 地址 } add_filter( 'login_headerurl', 'custom_loginlogo_url'); function custom_register_url($url) { return'https://dedewp.com/'; //在此输入你需要链接到的 URL 地址 } add_filter( 'login_registerurl', 'custom_register_url'); // 去 LOGO 的 title 文字 function custom_headertitle ( $title ) { return __( 'WordPress 一站式建站服务平台' ); } add_filter('login_headertitle','custom_headertitle'); // 添加登录注册界面的背景图片,修改登录,注册框的样式及按钮样式 function custom_loginbg() { echo '<style type="text/css">body{background: url('.get_bloginfo('template_directory').'/images/bg2.jpg) center center no-repeat;background-size: cover;}#login{position:absolute;bottom:10%;right:5%;}.login #nav{font-size:16px;}.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large {height: 35px;width: 100%;margin: 10px auto;line-height: 32px;padding: 0 12px 2px;}#backtoblog{display:none;}</style>'; } add_action('login_head', 'custom_loginbg');
注释的很清楚,按需选择哦!