美化WordPress后台登陆页面

许都 822 2

美化WordPress后台登陆页面

默认的wordpress后台登录界面,毫无特色可言,很平庸.........

美化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://www.xudu.org'; //在此输入你需要链接到的URL地址  
}  
add_filter( 'login_headerurl', 'custom_loginlogo_url');  
function custom_register_url($url) {  
return'https://www.xudu.org'; //在此输入你需要链接到的URL地址  
}  
add_filter( 'login_registerurl', 'custom_register_url');  
// 去LOGO的title文字  
function custom_headertitle ( $title ) {  
return __( '许都博客' );  
}  
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');

发表评论 取消回复
表情 图片 链接 代码

  1. 精斑外遇试纸
    精斑外遇试纸 Lv 1

    可以呀

  2. 梁兴健
    梁兴健 Lv 1

    加点CSS就解决的事情[aru_2]

分享